File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6062,6 +6062,10 @@ string_content : tSTRING_CONTENT[content]
60626062 $$ = p->lex.brace_nest;
60636063 p->lex.brace_nest = 0;
60646064 }[brace]<num>
6065+ {
6066+ $$ = p->lex.lpar_beg;
6067+ p->lex.lpar_beg = -1;
6068+ }[lpar]<num>
60656069 {
60666070 $$ = p->heredoc_indent;
60676071 p->heredoc_indent = 0;
@@ -6073,6 +6077,7 @@ string_content : tSTRING_CONTENT[content]
60736077 p->lex.strterm = $term;
60746078 SET_LEX_STATE($state);
60756079 p->lex.brace_nest = $brace;
6080+ p->lex.lpar_beg = $lpar;
60766081 p->heredoc_indent = $indent;
60776082 p->heredoc_line_indent = -1;
60786083 if ($compstmt) nd_unset_fl_newline($compstmt);
Original file line number Diff line number Diff line change @@ -323,6 +323,12 @@ def test_do_lambda
323323 end
324324 a . call
325325 assert_equal ( 42 , b )
326+
327+ obj = BasicObject . new
328+ assert_nothing_raised do
329+ a = obj . instance_eval ( '-> a = "#{foo do end}" do end' , __FILE__ , __LINE__ )
330+ end
331+ assert_raise_with_message ( NoMethodError , /foo/ ) { a . call }
326332 end
327333
328334 def test_block_call_colon2
You can’t perform that action at this time.
0 commit comments