Skip to content

Commit

Permalink
calls rb_intern() once
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jan 14, 2012
1 parent fa0ddc3 commit 3856d38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions parse.y
Expand Up @@ -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();
Expand Down

0 comments on commit 3856d38

Please sign in to comment.