* [ruby-core:120524] [Ruby master Bug#21010] Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism
@ 2025-01-07 14:44 tompng (tomoya ishida) via ruby-core
2025-01-07 18:40 ` [ruby-core:120530] " eileencodes (Eileen Uchitelle) via ruby-core
2025-01-07 19:21 ` [ruby-core:120533] " eileencodes (Eileen Uchitelle) via ruby-core
0 siblings, 2 replies; 3+ messages in thread
From: tompng (tomoya ishida) via ruby-core @ 2025-01-07 14:44 UTC (permalink / raw)
To: ruby-core; +Cc: tompng (tomoya ishida)
Issue #21010 has been reported by tompng (tomoya ishida).
----------------------------------------
Bug #21010: Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism
https://bugs.ruby-lang.org/issues/21010
* Author: tompng (tomoya ishida)
* Status: Open
* ruby -v: ruby 3.5.0dev (2025-01-06T01:50:53Z master c8e3d745fa) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
These codes is SyntaxError in parse.y but accepted in Prism
~~~ruby
def []=(k,v)=1
def obj.[]=(k,v)=1
~~~
These are both SyntaxError in parse.y and Prism by design.
~~~ruby
# invalid method name; a setter method cannot be defined in an endless method definition
def f=(k,v)=1
def obj.f=(k,v)=1
~~~
I think endless method definition of `[]=` should be also rejected.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:120530] [Ruby master Bug#21010] Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism
2025-01-07 14:44 [ruby-core:120524] [Ruby master Bug#21010] Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism tompng (tomoya ishida) via ruby-core
@ 2025-01-07 18:40 ` eileencodes (Eileen Uchitelle) via ruby-core
2025-01-07 19:21 ` [ruby-core:120533] " eileencodes (Eileen Uchitelle) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: eileencodes (Eileen Uchitelle) via ruby-core @ 2025-01-07 18:40 UTC (permalink / raw)
To: ruby-core; +Cc: eileencodes (Eileen Uchitelle)
Issue #21010 has been updated by eileencodes (Eileen Uchitelle).
Assignee set to prism
----------------------------------------
Bug #21010: Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism
https://bugs.ruby-lang.org/issues/21010#change-111333
* Author: tompng (tomoya ishida)
* Status: Open
* Assignee: prism
* ruby -v: ruby 3.5.0dev (2025-01-06T01:50:53Z master c8e3d745fa) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
These codes is SyntaxError in parse.y but accepted in Prism
~~~ruby
def []=(k,v)=1
def obj.[]=(k,v)=1
~~~
These are both SyntaxError in parse.y and Prism by design.
~~~ruby
# invalid method name; a setter method cannot be defined in an endless method definition
def f=(k,v)=1
def obj.f=(k,v)=1
~~~
I think endless method definition of `[]=` should be also rejected.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:120533] [Ruby master Bug#21010] Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism
2025-01-07 14:44 [ruby-core:120524] [Ruby master Bug#21010] Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism tompng (tomoya ishida) via ruby-core
2025-01-07 18:40 ` [ruby-core:120530] " eileencodes (Eileen Uchitelle) via ruby-core
@ 2025-01-07 19:21 ` eileencodes (Eileen Uchitelle) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: eileencodes (Eileen Uchitelle) via ruby-core @ 2025-01-07 19:21 UTC (permalink / raw)
To: ruby-core; +Cc: eileencodes (Eileen Uchitelle)
Issue #21010 has been updated by eileencodes (Eileen Uchitelle).
Fixed in https://github.com/ruby/prism/pull/3377
----------------------------------------
Bug #21010: Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism
https://bugs.ruby-lang.org/issues/21010#change-111335
* Author: tompng (tomoya ishida)
* Status: Open
* Assignee: prism
* ruby -v: ruby 3.5.0dev (2025-01-06T01:50:53Z master c8e3d745fa) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
These codes is SyntaxError in parse.y but accepted in Prism
~~~ruby
def []=(k,v)=1
def obj.[]=(k,v)=1
~~~
These are both SyntaxError in parse.y and Prism by design.
~~~ruby
# invalid method name; a setter method cannot be defined in an endless method definition
def f=(k,v)=1
def obj.f=(k,v)=1
~~~
I think endless method definition of `[]=` should be also rejected.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-07 19:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-07 14:44 [ruby-core:120524] [Ruby master Bug#21010] Endless method definition of `[]=` is SyntaxError in parse.y but allowed in Prism tompng (tomoya ishida) via ruby-core
2025-01-07 18:40 ` [ruby-core:120530] " eileencodes (Eileen Uchitelle) via ruby-core
2025-01-07 19:21 ` [ruby-core:120533] " eileencodes (Eileen Uchitelle) via ruby-core
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 NNTP newsgroup(s).