From: sergei.matheson@... Date: 2016-01-11T06:10:52+00:00 Subject: [ruby-core:72804] [Ruby trunk - Bug #11976] [Open] Assigning to nil as a hash short-circuits without error. Issue #11976 has been reported by Sergei Matheson. ---------------------------------------- Bug #11976: Assigning to nil as a hash short-circuits without error. https://bugs.ruby-lang.org/issues/11976 * Author: Sergei Matheson * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- When assigning to nil as a hash, the RHS gets short-circuited, and the hash assignment on nil returns nil. To reproduce: ~~~ nil[:some_key] = undefined_method # Expected: NameError: undefined local variable or method `undefined_method' for main:Object # Actual: evaluates to nil. No errors raised. ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: