Actions
Bug #11802
closedHash.new and {} have different behaviour
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
Description
It looks that {} is not recognized as a variable sometimes.
irb(main):001:0> p Hash.new
{}
=> {}
irb(main):002:0> p {}
=> nil
Similar in rspec test:
expect(subject.something).to eq {} # fails on not given argument for eq
expect(subject.something).to eq({}) # works
Actions
Like0
Like0Like0Like0