ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:72332] [Ruby trunk - Bug #11802] [Open] Hash.new and {} have different behaviour
@ 2015-12-18  4:13 Joseph Jones
  0 siblings, 0 replies; only message in thread
From: Joseph Jones @ 2015-12-18  4:13 UTC (permalink / raw)
  To: Ruby developers; +Cc: ruby-core

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

Joseph Jones liked your message with Boxer. On December 10, 2015 at 08:26:40 MST, aufi.cz@gmail.com wrote:Issue #11802 has been reported by Marek Aufart.----------------------------------------Bug #11802: Hash.new and {} have different behaviourhttps://bugs.ruby-lang.org/issues/11802* Author: Marek Aufart* Status: Open* Priority: Normal* Assignee: * ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN----------------------------------------It looks that {} is not recognized as a variable sometimes.irb(main):001:0> p Hash.new{}=> {}irb(main):002:0> p {}=> nilSimilar in rspec test:expect(subject.something).to eq {} # fails on not given argument for eqexpect(subject.something).to eq({}) # works-- https://bugs.ruby-lang.org/     

[-- Attachment #2: Type: text/html, Size: 1226 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-18  3:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18  4:13 [ruby-core:72332] [Ruby trunk - Bug #11802] [Open] Hash.new and {} have different behaviour Joseph Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).