From 7bf521122082784eab07b1dcd1303ddf09f62497 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 20 Oct 2009 06:38:03 +0000 Subject: [PATCH] * parse.y (ripper_intern): enable literal optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 +++- parse.y | 8 +------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 225daf50d0..33ca18a49d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -Tue Oct 20 15:28:49 2009 Nobuyoshi Nakada +Tue Oct 20 15:38:02 2009 Nobuyoshi Nakada + + * parse.y (ripper_intern): enable literal optimization. * parse.y (method_call): dispatch symbols. a patch from Andy Keep in [ruby-core:26169]. [ruby-core:26165] diff --git a/parse.y b/parse.y index c864132213..0d5c172c4b 100644 --- a/parse.y +++ b/parse.y @@ -513,7 +513,7 @@ static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,V #define yyparse ripper_yyparse -static VALUE ripper_intern(const char*); +#define ripper_intern(s) ID2SYM(rb_intern(s)) static VALUE ripper_id2sym(ID); #ifdef __GNUC__ #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ @@ -10179,12 +10179,6 @@ ripper_id2sym(ID id) return ID2SYM(rb_intern(name)); } -static VALUE -ripper_intern(const char *s) -{ - return ID2SYM(rb_intern(s)); -} - static ID ripper_get_id(VALUE v) {