From 3856d3853ab30cb00ece104cb7f9b5a5c227a93d Mon Sep 17 00:00:00 2001 From: Watson Date: Sat, 14 Jan 2012 20:47:40 +0900 Subject: [PATCH] calls rb_intern() once --- parse.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index 54a492dd3..87ea8c459 100644 --- a/parse.y +++ b/parse.y @@ -4951,8 +4951,10 @@ static void parser_prepare(struct parser_params *parser); static VALUE debug_lines(const char *f) { - if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) { - VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__")); + ID script_lines; + script_lines = rb_intern("SCRIPT_LINES__"); + if (rb_const_defined_at(rb_cObject, script_lines)) { + VALUE hash = rb_const_get_at(rb_cObject, script_lines); if (TYPE(hash) == T_HASH) { VALUE fname = rb_str_new2(f); VALUE lines = rb_ary_new();