diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-30 05:55:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-30 05:55:50 +0000 |
commit | 7d9628ef0200936d1deb0ab866a006a94fe00d91 (patch) | |
tree | 29a3778bf4e64565c1b31473de985a24fec2139e /eval.c | |
parent | f6dd3316eb02d8d8f0d229f28d513d6ad4895fca (diff) | |
download | ruby-7d9628ef0200936d1deb0ab866a006a94fe00d91.tar.gz |
* eval.c (rb_Array): exclude Kernel#to_a instead of Object#to_a.
(ruby-bugs-ja:PR#483)
* lib/optparse.rb (OptionParser::Switch#parse_arg): not splat.
* lib/optparse.rb (OptionParser::Switch#conv_arg): splat if no
conversion supplied.
* lib/optparse.rb (OptionParser::Switch::PlacedArgument#parse):
override next switch after argument conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2359,7 +2359,7 @@ rb_Array(val) ID id = rb_intern("to_a"); if (search_method(CLASS_OF(val), id, &origin) && - origin != RCLASS(rb_cObject)->super) { /* exclude Object#to_a */ + RCLASS(origin)->m_tbl != RCLASS(rb_mKernel)->m_tbl) { /* exclude Kernel#to_a */ val = rb_funcall(val, id, 0); if (TYPE(val) != T_ARRAY) { rb_raise(rb_eTypeError, "`to_a' did not return Array"); |