[#71439] [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API — matz@...
Issue #11339 has been updated by Yukihiro Matsumoto.
7 messages
2015/11/11
[#71473] Re: [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API
— Eric Wong <normalperson@...>
2015/11/13
Entire series for sockets
[#71450] Ruby 2.3.0-preview1 Released — "NARUSE, Yui" <naruse@...>
Hi,
5 messages
2015/11/11
[#71617] [Ruby trunk - Feature #11664] [PATCH] introduce rb_autoload_value to replace rb_autoload — nobu@...
Issue #11664 has been updated by Nobuyoshi Nakada.
3 messages
2015/11/20
[#71721] [Ruby trunk - Feature #11741] Migrate Ruby to Git from Subversion — me@...
Issue #11741 has been updated by Jon Moss.
4 messages
2015/11/28
[ruby-core:71349] [Ruby trunk - Bug #11659] Strange behavior setting previously-undefined local variables with a statement modifier
From:
hanmac@...
Date:
2015-11-05 06:59:53 UTC
List:
ruby-core #71349
Issue #11659 has been updated by Hans Mackowiak. ~~~ var2 = 'default' if defined?(var1).nil?; var2 ~~~ because you got a typo for var2, see the var1 inside. ~~~ var4 = 'default' if defined?(var4).nil?; var4 ~~~ the problem there is that var got defined from the parser before the code is run, so when it does check for defined, var4 is already defined also checkout: ~~~ var = "ok" if false; var #=> nil ~~~ ---------------------------------------- Bug #11659: Strange behavior setting previously-undefined local variables with a statement modifier https://bugs.ruby-lang.org/issues/11659#change-54717 * Author: Mike Pastore * 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 ---------------------------------------- Consider a previously-undefined local variable `var1`: ~~~ irb(main):001:0> if defined?(var1).nil?; var1 = 'default'; end; var1 => "default" ~~~ Consider previously-undefined local variables `var1` and `var2`: ~~~ irb(main):001:0> var2 = 'default' if defined?(var1).nil?; var2 => "default" ~~~ Consider a previously-undefined local variable `var3`: ~~~ irb(main):001:0> var3 = 'default' if true; var3 => "default" ~~~ Consider a previously-undefined local variable `var4`: ~~~ irb(main):001:0> var4 = 'default' if defined?(var4).nil?; var4 => nil ~~~ Oops! Why is `var4` nil? Logically, considering the prior examples, it should be 'default'. Or are we missing something? http://stackoverflow.com/questions/33537059/unless-defined-is-not-working-in-my-code -- https://bugs.ruby-lang.org/