[#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:69117] [Ruby trunk - Bug #11107] Syntax error is raised by "p ->() do a(1) do end end", but not by "p ->() do a 1 do end end"
From:
usa@...
Date:
2015-05-11 02:02:02 UTC
List:
ruby-core #69117
Issue #11107 has been updated by Usaku NAKAMURA.
Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED
ruby_2_1 r50468 merged revision(s) 50402.
----------------------------------------
Bug #11107: Syntax error is raised by "p ->() do a(1) do end end", but not by "p ->() do a 1 do end end"
https://bugs.ruby-lang.org/issues/11107#change-52369
* Author: _ wanabe
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0dev (2015-04-26 trunk 50395) [x86_64-darwin14]
* Backport: 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED
----------------------------------------
As below, lambda literal with do..end block can raise syntax error.
```
$ ./ruby -ve 'p ->() do a(1) do end end'
ruby 2.3.0dev (2015-04-26 trunk 50395) [x86_64-darwin14]
-e:1: syntax error, unexpected keyword_do_block, expecting keyword_end
p ->() do a(1) do end end
^
```
The error is not raised when I use {...} block or omit parentheses from method call in lambda.
NG cases:
```ruby
p ->() do a(1) do end end
p ->() do a() do end end
p 1, ->() do a(1) do end end
```
OK cases:
```ruby
p ->() do a 1 do end end
p ->() do a do end end
p ->() { a(1) do end }
p ->() do a(1) {} end
p ->() { a(1) { } }
```
Confirmed versions (same results):
* ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin14.3.0]
* ruby 2.0.0p598 (2014-11-13) [i386-mingw32]
* ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
* ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
* ruby 2.3.0dev (2015-04-26 trunk 50395) [x86_64-darwin14]
--
https://bugs.ruby-lang.org/