diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-09 15:10:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-09 15:10:24 +0000 |
commit | ab81f8730266376dcea70a8f26b45bcac588e253 (patch) | |
tree | 0165bdd5573db995b2fa720412504bc4edb3ee24 /parse.y | |
parent | 9a87cff60c160278d43e226de6df6d5694c488d4 (diff) | |
download | ruby-ab81f8730266376dcea70a8f26b45bcac588e253.tar.gz |
* 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
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -8953,6 +8953,15 @@ ripper_s_allocate(VALUE klass) 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) /* @@ -8973,7 +8982,7 @@ ripper_initialize(int argc, VALUE *argv, VALUE self) Data_Get_Struct(self, struct parser_params, parser); 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; } else { |