diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-11 12:42:50 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-11 12:42:50 +0000 |
| commit | b5d7ee1228795b74fafe6efe5c963ee35a1e9e5f (patch) | |
| tree | 93fcdac5b5aa7c4d11a6e011a89275cd2103ffac /parse.y | |
| parent | a2767784df160785f5502c48888202245d8b2638 (diff) | |
| download | ruby-b5d7ee1228795b74fafe6efe5c963ee35a1e9e5f.tar.gz ruby-b5d7ee1228795b74fafe6efe5c963ee35a1e9e5f.tar.xz ruby-b5d7ee1228795b74fafe6efe5c963ee35a1e9e5f.zip | |
* eval.c (rb_obj_respond_to): check if obj responds to the given
method with the given visibility. [ruby-dev:27408]
* eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -8953,15 +8953,6 @@ 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) /* @@ -8982,7 +8973,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 (obj_respond_to(src, ID2SYM(ripper_id_gets))) { + if (rb_obj_respond_to(src, ripper_id_gets, 0)) { parser->parser_lex_gets = ripper_lex_get_generic; } else { |
