diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 18 | ||||
| -rw-r--r-- | test/ruby/test_parse.rb | 14 |
2 files changed, 0 insertions, 32 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 3dbc634828..65f1d96f97 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -2012,24 +2012,6 @@ end obj[*[1]] = 3 RUBY - # Test passing block inside of []= - assert_prism_eval(<<~RUBY) - obj = Object.new - def obj.[]=(a); end - - p = proc {} - obj[&p] = 4 - RUBY - - # Test splat and block inside of []= - assert_prism_eval(<<~RUBY) - obj = Object.new - def obj.[]=(a, b); end - - p = proc {} - obj[*[1], &p] = 4 - RUBY - assert_prism_eval(<<-CODE) def self.prism_opt_var_trail_hash(a = nil, *b, c, **d); end prism_opt_var_trail_hash("a") diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index a8abccb1f9..051fac274f 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -916,20 +916,6 @@ x = __ENCODING__ assert_syntax_error("$& = 1", /Can't set variable/) end - def test_arg_concat - o = Object.new - class << o; self; end.instance_eval do - define_method(:[]=) {|*r, &b| b.call(r) } - end - r = nil - assert_nothing_raised do - eval <<-END, nil, __FILE__, __LINE__+1 - o[&proc{|x| r = x }] = 1 - END - end - assert_equal([1], r) - end - def test_void_expr_stmts_value x = 1 useless_use = /useless use/ |
