From 7d9628ef0200936d1deb0ab866a006a94fe00d91 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 30 May 2003 05:55:50 +0000 Subject: * 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 --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index c858490496..b8d9ef3d76 100644 --- a/eval.c +++ b/eval.c @@ -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"); -- cgit v1.2.3