Issue #9966 has been updated by Tomoyuki C…
Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1:
DONE
And already backported into ruby_2_0_0
branch at r46670.
Bug #9966: Encoding.find(symbol)の動作がrdocと異なる
- Author: Wataru Kimura
- Status: Closed
- Priority: Normal
- Assignee:
- Category: doc
- Target version:
- ruby -v: ruby 2.2.0dev (2014-06-20 trunk 46480) [x86_64-darwin13]
- Backport: 2.0.0: DONE, 2.1: DONE
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となります。