summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse.y1
-rw-r--r--test/ripper/test_scanner_events.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 01f0c9a64c..4275f245b8 100644
--- a/parse.y
+++ b/parse.y
@@ -6207,7 +6207,6 @@ parser_parse_string(struct parser_params *parser, NODE *quote)
pushback(c);
if (tokadd_string(func, term, paren, &quote->nd_nest,
&enc) == -1) {
- ruby_sourceline = nd_line(quote);
if (func & STR_FUNC_REGEXP) {
if (parser->eofp)
compile_error(PARSER_ARG "unterminated regexp meets end of file");
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index 7ae58bbda8..8cf7ac1220 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -131,6 +131,8 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
assert_location %Q["a\nb\r\nc"]
assert_location "print(<<""EOS)\nheredoc\nEOS\n"
assert_location "print(<<-\"EOS\")\nheredoc\n EOS\n"
+ assert_location "'foo'"
+ assert_location "'foo"
end
def assert_location(src)