mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add debug method RubyVM::mtbl2 (disabled)
This commit is contained in:
parent
bf9abc4772
commit
d9135743c0
1 changed files with 11 additions and 1 deletions
12
vm.c
12
vm.c
|
@ -2968,7 +2968,14 @@ f_lambda(VALUE _)
|
|||
static VALUE
|
||||
vm_mtbl(VALUE self, VALUE obj, VALUE sym)
|
||||
{
|
||||
vm_mtbl_dump(CLASS_OF(obj), SYM2ID(sym));
|
||||
vm_mtbl_dump(CLASS_OF(obj), RTEST(sym) ? SYM2ID(sym) : 0);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
vm_mtbl2(VALUE self, VALUE obj, VALUE sym)
|
||||
{
|
||||
vm_mtbl_dump(obj, RTEST(sym) ? SYM2ID(sym) : 0);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
@ -3260,10 +3267,13 @@ Init_VM(void)
|
|||
rb_define_singleton_method(rb_cRubyVM, "SDR", sdr, 0);
|
||||
rb_define_singleton_method(rb_cRubyVM, "NSDR", nsdr, 0);
|
||||
rb_define_singleton_method(rb_cRubyVM, "mtbl", vm_mtbl, 2);
|
||||
rb_define_singleton_method(rb_cRubyVM, "mtbl", vm_mtbl, 2);
|
||||
rb_define_singleton_method(rb_cRubyVM, "mtbl2", vm_mtbl2, 2);
|
||||
#else
|
||||
(void)sdr;
|
||||
(void)nsdr;
|
||||
(void)vm_mtbl;
|
||||
(void)vm_mtbl2;
|
||||
#endif
|
||||
|
||||
/* VM bootstrap: phase 2 */
|
||||
|
|
Loading…
Reference in a new issue