summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-30 05:55:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-30 05:55:50 +0000
commit7d9628ef0200936d1deb0ab866a006a94fe00d91 (patch)
tree29a3778bf4e64565c1b31473de985a24fec2139e /eval.c
parentf6dd3316eb02d8d8f0d229f28d513d6ad4895fca (diff)
* 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.c2
1 files changed, 1 insertions, 1 deletions
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");