mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: revert lbracket
* parse.y (lbracket): remove .? before aref. [Feature #11537] revert r52422 and r52424 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b907c6e925
commit
a3ee54f8a6
3 changed files with 8 additions and 39 deletions
|
@ -46,13 +46,9 @@ class TestCall < Test::Unit::TestCase
|
|||
assert_equal(5, o.y)
|
||||
o.?z ||= 6
|
||||
assert_equal(6, o.z)
|
||||
assert_equal(42, o.?[:x])
|
||||
assert_equal(42, o.?["x"])
|
||||
|
||||
o = nil
|
||||
assert_nil(o.?x)
|
||||
assert_nil(o.?[:x])
|
||||
assert_nil(o.?["x"])
|
||||
assert_nothing_raised(NoMethodError) {o.?x = 6}
|
||||
assert_nothing_raised(NoMethodError) {o.?x *= 7}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue