Project

General

Profile

Actions

Bug #9966

closed

Encoding.find(symbol)の動作がrdocと異なる

Added by kimuraw (Wataru Kimura) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-06-20 trunk 46480) [x86_64-darwin13]
[ruby-dev:48308]

Description

http://www.ruby-doc.org/core-2.1.2/Encoding.html#method-c-find

Encding.find()は、stringまたはsymbolを受け付けるとrdocにありますが、
symbolを渡したときはTypeErrorになります。これは意図された動作でしょうか?

% /usr/local/stow/ruby-2.2-dev/bin/ruby -e 'Encoding.find(:Shift_JIS)' 
-e:1:in `find': no implicit conversion of Symbol into String (TypeError)
	from -e:1:in `<main>'

ruby-2.1.2とruby-2.0.0p481でも同様にTypeErrorとなります。

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0