summaryrefslogtreecommitdiff
path: root/ext/ripper/eventids2.c
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-02 07:11:41 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-02 07:11:41 +0000
commita056098cb719312452eca309bec914406f9e5ca3 (patch)
tree36680bbcdabc53cd0a4132996d2b8984eaaa945d /ext/ripper/eventids2.c
parent78c75d91ae577df2c43ba5b41891572d75105b2d (diff)
* NEWS: Add note about frozen string literals
* compile.c (case_when_optimizable_literal): optimize NODE_LIT strings in when clauses of case statements * ext/ripper/eventids2.c: add tSTRING_SUFFIX * parse.y: add 'f' suffix on string literals for frozen strings * test/ripper/test_scanner_events.rb: add scanner tests * test/ruby/test_string.rb: add frozen string tests [Feature #8579] [ruby-core:55699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/ripper/eventids2.c')
-rw-r--r--ext/ripper/eventids2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/ripper/eventids2.c b/ext/ripper/eventids2.c
index 423f9d7e296..2d09573506e 100644
--- a/ext/ripper/eventids2.c
+++ b/ext/ripper/eventids2.c
@@ -37,6 +37,7 @@ static ID ripper_id_symbeg;
static ID ripper_id_tstring_beg;
static ID ripper_id_tstring_content;
static ID ripper_id_tstring_end;
+static ID ripper_id_tstring_suffix;
static ID ripper_id_words_beg;
static ID ripper_id_qwords_beg;
static ID ripper_id_qsymbols_beg;
@@ -94,6 +95,7 @@ ripper_init_eventids2(void)
ripper_id_tstring_beg = rb_intern_const("on_tstring_beg");
ripper_id_tstring_content = rb_intern_const("on_tstring_content");
ripper_id_tstring_end = rb_intern_const("on_tstring_end");
+ ripper_id_tstring_suffix = rb_intern_const("on_tstring_suffix");
ripper_id_words_beg = rb_intern_const("on_words_beg");
ripper_id_qwords_beg = rb_intern_const("on_qwords_beg");
ripper_id_qsymbols_beg = rb_intern_const("on_qsymbols_beg");
@@ -252,6 +254,7 @@ static const struct token_assoc {
{tSTRING_DEND, &ripper_id_embexpr_end},
{tSTRING_DVAR, &ripper_id_embvar},
{tSTRING_END, &ripper_id_tstring_end},
+ {tSTRING_SUFFIX, &ripper_id_tstring_suffix},
{tSYMBEG, &ripper_id_symbeg},
{tUMINUS, &ripper_id_op},
{tUMINUS_NUM, &ripper_id_op},