* [ruby-core:119242] [Ruby master Bug#20751] Regression in Prism related to use of super in default argument values
@ 2024-09-17 23:19 jeremyevans0 (Jeremy Evans) via ruby-core
2024-09-17 23:37 ` [ruby-core:119243] [Ruby master Bug#20751] Regression in Prism related to use of return " kddnewton (Kevin Newton) via ruby-core
2024-09-17 23:49 ` [ruby-core:119244] " jeremyevans0 (Jeremy Evans) via ruby-core
0 siblings, 2 replies; 3+ messages in thread
From: jeremyevans0 (Jeremy Evans) via ruby-core @ 2024-09-17 23:19 UTC (permalink / raw)
To: ruby-core; +Cc: jeremyevans0 (Jeremy Evans)
Issue #20751 has been reported by jeremyevans0 (Jeremy Evans).
----------------------------------------
Bug #20751: Regression in Prism related to use of super in default argument values
https://bugs.ruby-lang.org/issues/20751
* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED
----------------------------------------
All versions of parse.y dating at least back to Ruby 1.8.7, and Prism in both Ruby 3.3.5 and 3.4.0preview1, correctly parses this code:
```ruby
class A
def foo(b = nil || (return))
end
end
```
The master branch, unless `--parser=parse.y` is used, now considers this a SyntaxError:
```
-: -:2: syntax error found (SyntaxError)
1 | class A
> 2 | def foo(b = nil || (return))
| ^~~~~~ Invalid return in class/module body
3 | end
4 | end
```
--
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:119243] [Ruby master Bug#20751] Regression in Prism related to use of return in default argument values
2024-09-17 23:19 [ruby-core:119242] [Ruby master Bug#20751] Regression in Prism related to use of super in default argument values jeremyevans0 (Jeremy Evans) via ruby-core
@ 2024-09-17 23:37 ` kddnewton (Kevin Newton) via ruby-core
2024-09-17 23:49 ` [ruby-core:119244] " jeremyevans0 (Jeremy Evans) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: kddnewton (Kevin Newton) via ruby-core @ 2024-09-17 23:37 UTC (permalink / raw)
To: ruby-core; +Cc: kddnewton (Kevin Newton)
Issue #20751 has been updated by kddnewton (Kevin Newton).
I believe this was fixed this morning. Could you double-check that this is still an issue?
----------------------------------------
Bug #20751: Regression in Prism related to use of return in default argument values
https://bugs.ruby-lang.org/issues/20751#change-109825
* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED
----------------------------------------
All versions of parse.y dating at least back to Ruby 1.8.7, and Prism in both Ruby 3.3.5 and 3.4.0preview1, correctly parses this code:
```ruby
class A
def foo(b = nil || (return))
end
end
```
The master branch, unless `--parser=parse.y` is used, now considers this a SyntaxError:
```
-: -:2: syntax error found (SyntaxError)
1 | class A
> 2 | def foo(b = nil || (return))
| ^~~~~~ Invalid return in class/module body
3 | end
4 | end
```
--
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:119244] [Ruby master Bug#20751] Regression in Prism related to use of return in default argument values
2024-09-17 23:19 [ruby-core:119242] [Ruby master Bug#20751] Regression in Prism related to use of super in default argument values jeremyevans0 (Jeremy Evans) via ruby-core
2024-09-17 23:37 ` [ruby-core:119243] [Ruby master Bug#20751] Regression in Prism related to use of return " kddnewton (Kevin Newton) via ruby-core
@ 2024-09-17 23:49 ` jeremyevans0 (Jeremy Evans) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: jeremyevans0 (Jeremy Evans) via ruby-core @ 2024-09-17 23:49 UTC (permalink / raw)
To: ruby-core; +Cc: jeremyevans0 (Jeremy Evans)
Issue #20751 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Open to Closed
kddnewton (Kevin Newton) wrote in #note-2:
> I believe this was fixed this morning. Could you double-check that this is still an issue?
Looks like it is fixed in ruby/prism, but not ruby/ruby, since https://github.com/ruby/prism/commit/e98ea155960eb98649f3990da19635e63f52ba28 is not yet merged to ruby/ruby. I'll close this as I assume it will be merged to ruby/ruby soon.
----------------------------------------
Bug #20751: Regression in Prism related to use of return in default argument values
https://bugs.ruby-lang.org/issues/20751#change-109826
* Author: jeremyevans0 (Jeremy Evans)
* Status: Closed
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED
----------------------------------------
All versions of parse.y dating at least back to Ruby 1.8.7, and Prism in both Ruby 3.3.5 and 3.4.0preview1, correctly parses this code:
```ruby
class A
def foo(b = nil || (return))
end
end
```
The master branch, unless `--parser=parse.y` is used, now considers this a SyntaxError:
```
-: -:2: syntax error found (SyntaxError)
1 | class A
> 2 | def foo(b = nil || (return))
| ^~~~~~ Invalid return in class/module body
3 | end
4 | end
```
--
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:[~2024-09-17 23:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-17 23:19 [ruby-core:119242] [Ruby master Bug#20751] Regression in Prism related to use of super in default argument values jeremyevans0 (Jeremy Evans) via ruby-core
2024-09-17 23:37 ` [ruby-core:119243] [Ruby master Bug#20751] Regression in Prism related to use of return " kddnewton (Kevin Newton) via ruby-core
2024-09-17 23:49 ` [ruby-core:119244] " jeremyevans0 (Jeremy Evans) 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).