[#113435] [Ruby master Feature#19634] Pattern matching dynamic key — "baweaver (Brandon Weaver) via ruby-core" <ruby-core@...>
Issue #19634 has been reported by baweaver (Brandon Weaver).
6 messages
2023/05/09
[#113489] [Ruby master Bug#19642] Remove vectored read/write from `io.c`. — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>
Issue #19642 has been reported by ioquatix (Samuel Williams).
10 messages
2023/05/15
[ruby-core:113399] [Ruby master Bug#19619] Numbered parameters don't work with method definition with parameters
From:
duerst via ruby-core <ruby-core@...>
Date:
2023-05-03 05:37:59 UTC
List:
ruby-core #113399
Issue #19619 has been updated by duerst (Martin D=FCrst).
@nobu In the above commit, I think `node_new_temporary` would be clearer th=
an `node_new_temporal`.
----------------------------------------
Bug #19619: Numbered parameters don't work with method definition with para=
meters
https://bugs.ruby-lang.org/issues/19619#change-102970
* Author: okuramasafumi (Masafumi OKURA)
* Status: Closed
* Priority: Normal
* ruby -v: 3.2.2
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
This works:
```ruby
class Foo
def bar(baz) =3D 'foo'
end
p Foo.new.bar('baz')
```
This also works:
```ruby
o =3D Object.new
o.tap { |obj| def obj.bar(baz) =3D 'foo' }
p o.bar('baz')
```
Even this works:
```ruby
o =3D Object.new
o.tap { def _1.bar =3D 'foo' }
p o.bar
```
But this DOESN'T work:
```ruby
o =3D Object.new
o.tap { def _1.bar(baz) =3D 'foo' }
p o.bar('baz')
```
So, when we define a method with parameters on an instance given as numbere=
d parameters, it doesn't work. If we change one condition (definition way, =
parameter existence, and so on), it works.
--=20
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- [email protected]
To unsubscribe send an email to [email protected]
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-c=
ore.ml.ruby-lang.org/