mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (ripper_initialize): rollback obj_respond_to().
fixed: [ruby-dev:27406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9a87cff60c
commit
ab81f87302
2 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Oct 10 00:09:54 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (ripper_initialize): rollback obj_respond_to().
|
||||||
|
fixed: [ruby-dev:27406]
|
||||||
|
|
||||||
Sat Oct 8 19:49:42 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Oct 8 19:49:42 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666]
|
* eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666]
|
||||||
|
|
11
parse.y
11
parse.y
|
@ -8953,6 +8953,15 @@ ripper_s_allocate(VALUE klass)
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
obj_respond_to(VALUE obj, VALUE mid)
|
||||||
|
{
|
||||||
|
VALUE st;
|
||||||
|
|
||||||
|
st = rb_funcall(obj, rb_intern("respond_to?"), 2, mid, Qfalse);
|
||||||
|
return RTEST(st);
|
||||||
|
}
|
||||||
|
|
||||||
#define ripper_initialized_p(r) ((r)->parser_lex_input != 0)
|
#define ripper_initialized_p(r) ((r)->parser_lex_input != 0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -8973,7 +8982,7 @@ ripper_initialize(int argc, VALUE *argv, VALUE self)
|
||||||
|
|
||||||
Data_Get_Struct(self, struct parser_params, parser);
|
Data_Get_Struct(self, struct parser_params, parser);
|
||||||
rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
|
rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
|
||||||
if (rb_respond_to(src, ripper_id_gets)) {
|
if (obj_respond_to(src, ID2SYM(ripper_id_gets))) {
|
||||||
parser->parser_lex_gets = ripper_lex_get_generic;
|
parser->parser_lex_gets = ripper_lex_get_generic;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue