ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:91859] [Ruby trunk Bug#15672] Lambda implicit arguments, differences between lambda {} and -> {} specifications
       [not found] <redmine.issue-15672.20190318033432@ruby-lang.org>
@ 2019-03-18  3:34 ` takeshinoda
  2019-03-18  6:12 ` [ruby-core:91863] " hanmac
  2019-03-18 11:51 ` [ruby-core:91866] " shevegen
  2 siblings, 0 replies; 3+ messages in thread
From: takeshinoda @ 2019-03-18  3:34 UTC (permalink / raw)
  To: ruby-core

Issue #15672 has been reported by takeshinoda (Takeshi Shinoda).

----------------------------------------
Bug #15672: Lambda implicit arguments, differences between lambda {} and -> {} specifications
https://bugs.ruby-lang.org/issues/15672

* Author: takeshinoda (Takeshi Shinoda)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67291) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi

Are the following differences intentional?

```
$ ruby -v
ruby 2.7.0dev (2019-03-18 trunk 67291) [x86_64-darwin18]
```

```
$ cat ptn1.rb
a = -> { p @1 }
a.call(1)
 $ ruby ptn1.rb
Traceback (most recent call last):
        1: from ptn1.rb:2:in `<main>'
ptn1.rb:1:in `block in <main>': wrong number of arguments (given 1, expected 0) (ArgumentError)
```

```
$ cat ptn2.rb
a = lambda { p @1 }
a.call(1)
 $ ruby ptn2.rb
1
```

thanks



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:91863] [Ruby trunk Bug#15672] Lambda implicit arguments, differences between lambda {} and -> {} specifications
       [not found] <redmine.issue-15672.20190318033432@ruby-lang.org>
  2019-03-18  3:34 ` [ruby-core:91859] [Ruby trunk Bug#15672] Lambda implicit arguments, differences between lambda {} and -> {} specifications takeshinoda
@ 2019-03-18  6:12 ` hanmac
  2019-03-18 11:51 ` [ruby-core:91866] " shevegen
  2 siblings, 0 replies; 3+ messages in thread
From: hanmac @ 2019-03-18  6:12 UTC (permalink / raw)
  To: ruby-core

Issue #15672 has been updated by Hanmac (Hans Mackowiak).


Duplicate of #15620

----------------------------------------
Bug #15672: Lambda implicit arguments, differences between lambda {} and -> {} specifications
https://bugs.ruby-lang.org/issues/15672#change-77132

* Author: takeshinoda (Takeshi Shinoda)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67291) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi

Are the following differences intentional?

```
$ ruby -v
ruby 2.7.0dev (2019-03-18 trunk 67291) [x86_64-darwin18]
```

```
$ cat ptn1.rb
a = -> { p @1 }
a.call(1)
 $ ruby ptn1.rb
Traceback (most recent call last):
        1: from ptn1.rb:2:in `<main>'
ptn1.rb:1:in `block in <main>': wrong number of arguments (given 1, expected 0) (ArgumentError)
```

```
$ cat ptn2.rb
a = lambda { p @1 }
a.call(1)
 $ ruby ptn2.rb
1
```

thanks



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:91866] [Ruby trunk Bug#15672] Lambda implicit arguments, differences between lambda {} and -> {} specifications
       [not found] <redmine.issue-15672.20190318033432@ruby-lang.org>
  2019-03-18  3:34 ` [ruby-core:91859] [Ruby trunk Bug#15672] Lambda implicit arguments, differences between lambda {} and -> {} specifications takeshinoda
  2019-03-18  6:12 ` [ruby-core:91863] " hanmac
@ 2019-03-18 11:51 ` shevegen
  2 siblings, 0 replies; 3+ messages in thread
From: shevegen @ 2019-03-18 11:51 UTC (permalink / raw)
  To: ruby-core

Issue #15672 has been updated by shevegen (Robert A. Heiler).


Koichi said it will be fixed. :)

(I guess this was never intentional, thus a bug.)

----------------------------------------
Bug #15672: Lambda implicit arguments, differences between lambda {} and -> {} specifications
https://bugs.ruby-lang.org/issues/15672#change-77135

* Author: takeshinoda (Takeshi Shinoda)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67291) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi

Are the following differences intentional?

```
$ ruby -v
ruby 2.7.0dev (2019-03-18 trunk 67291) [x86_64-darwin18]
```

```
$ cat ptn1.rb
a = -> { p @1 }
a.call(1)
 $ ruby ptn1.rb
Traceback (most recent call last):
        1: from ptn1.rb:2:in `<main>'
ptn1.rb:1:in `block in <main>': wrong number of arguments (given 1, expected 0) (ArgumentError)
```

```
$ cat ptn2.rb
a = lambda { p @1 }
a.call(1)
 $ ruby ptn2.rb
1
```

thanks



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-18 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15672.20190318033432@ruby-lang.org>
2019-03-18  3:34 ` [ruby-core:91859] [Ruby trunk Bug#15672] Lambda implicit arguments, differences between lambda {} and -> {} specifications takeshinoda
2019-03-18  6:12 ` [ruby-core:91863] " hanmac
2019-03-18 11:51 ` [ruby-core:91866] " shevegen

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).