[#69084] [Ruby trunk - Feature #11124] [Open] [PATCH] lib/*: use monotonic clock for timeouts — normalperson@...
Issue #11124 has been reported by Eric Wong.
5 messages
2015/05/06
[#69138] [Ruby trunk - Feature #11136] [PATCH] webrick: avoid fcntl module — nobu@...
Issue #11136 has been updated by Nobuyoshi Nakada.
3 messages
2015/05/12
[#69160] [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start — nobu@...
Issue #11146 has been updated by Nobuyoshi Nakada.
4 messages
2015/05/13
[#69175] Re: [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start
— Eric Wong <normalperson@...>
2015/05/13
nobu@ruby-lang.org wrote:
[ruby-core:69062] [Ruby trunk - Bug #11115] [Rejected] Assigning a non-existent local variable to itself sets it to nil; unintuitive behaviour?
From:
nobu@...
Date:
2015-05-03 08:39:03 UTC
List:
ruby-core #69062
Issue #11115 has been updated by Nobuyoshi Nakada. Description updated Status changed from Open to Rejected George Millo wrote: > Is this a bug, or a feature? A feature. ---------------------------------------- Bug #11115: Assigning a non-existent local variable to itself sets it to nil; unintuitive behaviour? https://bugs.ruby-lang.org/issues/11115#change-52315 * Author: George Millo * Status: Rejected * Priority: Low * Assignee: * ruby -v: 2.2.2 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Here's what normally happens when I try to reference a local variable that doesn't exist: ~~~ruby def foo bar end foo # => NameError: undefined local variable or method `bar' ~~~ But if I assign bar to "itself", it doesn't raise an error ~~~ruby def foo bar = bar bar end foo # => no results ~~~ Looks like `bar` in the second example is being set to `nil`. This doesn't feel very intuitive to me; shouldn't this raise an error? I mean, if you try to assign the non-existent variable 'bar' to anything else, that's how it works: ~~~ruby def foo fizz = bar end foo # => NameError: undefined local variable or method `bar' ~~~ Is this a bug, or a feature? -- https://bugs.ruby-lang.org/