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 | 89146e0f644fdd65a1e1ea7c3eef6a7ec98b9e13 (patch) | |
tree | 29a3778bf4e64565c1b31473de985a24fec2139e /eval.c | |
parent | 0ac623444385e78a33af24e7e1f14671eddfc4d3 (diff) | |
download | ruby-89146e0f644fdd65a1e1ea7c3eef6a7ec98b9e13.tar.gz ruby-89146e0f644fdd65a1e1ea7c3eef6a7ec98b9e13.tar.xz ruby-89146e0f644fdd65a1e1ea7c3eef6a7ec98b9e13.zip |
* 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: http://svn.ruby-lang.org/repos/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"); |