summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-02 14:58:11 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-02 14:58:11 +0000
commit0f0b60ea86af7fd9db03639a8a92d63a49e94f24 (patch)
tree4bfdc07284c33030c6608b87841c9386ddd3bb8f /vm.c
parent5339293fb868a0273507f6f9de705b2babd8dad5 (diff)
* vm.c (m_core_define_method, m_core_define_singleton_method): now
the value of def-expr is the Symbol of the name of the method, not nil. ref. [ruby-dev:42151] [Feature #3753] * test/ruby/test_syntax.rb (TestSyntax#test_value_of_def): test for above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 8e01a17dc1..3150ee8ac6 100644
--- a/vm.c
+++ b/vm.c
@@ -2052,7 +2052,7 @@ m_core_define_method(VALUE self, VALUE cbase, VALUE sym, VALUE iseqval)
REWIND_CFP({
vm_define_method(GET_THREAD(), cbase, SYM2ID(sym), iseqval, 0, rb_vm_cref());
});
- return Qnil;
+ return sym;
}
static VALUE
@@ -2061,7 +2061,7 @@ m_core_define_singleton_method(VALUE self, VALUE cbase, VALUE sym, VALUE iseqval
REWIND_CFP({
vm_define_method(GET_THREAD(), cbase, SYM2ID(sym), iseqval, 1, rb_vm_cref());
});
- return Qnil;
+ return sym;
}
static VALUE