[#116016] [Ruby master Bug#20150] Memory leak in grapheme clusters — "peterzhu2118 (Peter Zhu) via ruby-core" <ruby-core@...>
Issue #20150 has been reported by peterzhu2118 (Peter Zhu).
7 messages
2024/01/04
[#116382] [Ruby master Feature#20205] Enable `frozen_string_literal` by default — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Issue #20205 has been reported by byroot (Jean Boussier).
77 messages
2024/01/23
[ruby-core:116069] [Ruby master Bug#20159] Prism assertion failure even if it is executed with --parser=parse.y
From:
"kddnewton (Kevin Newton) via ruby-core" <ruby-core@...>
Date:
2024-01-08 14:53:29 UTC
List:
ruby-core #116069
Issue #20159 has been updated by kddnewton (Kevin Newton).
I'm having difficulty reproducing this.
```
$ ruby -v
ruby 3.4.0dev (2024-01-07T16:23:58Z master 8b86d6f0c1) [arm64-darwin23]
$ (echo "<<A+%"; echo "A") > a.rb$ ruby --parser=parse.y a.rb
a.rb: a.rb:1: unterminated string meets end of file (SyntaxError)
<<A+%
^
```
and with IRB:
```
irb(main):001> RUBY_VERSION
=> "3.4.0"
irb(main):002> eval File.read('a.rb')
(irb):2:in `eval': (eval at (irb):2):1: unterminated string meets end of file (SyntaxError)
<<A+%
^
from (irb):2:in `<main>'
from <internal:kernel>:187:in `loop'
from /Users/kddnewton/.rubies/ruby-yjit/lib/ruby/gems/3.4.0+0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
from /Users/kddnewton/.rubies/ruby-yjit/bin/irb:25:in `load'
from /Users/kddnewton/.rubies/ruby-yjit/bin/irb:25:in `<main>'
irb(main):003> load 'a.rb'
(irb):3:in `load': a.rb:1: unterminated string meets end of file (SyntaxError)
<<A+%
^
from (irb):3:in `<main>'
from <internal:kernel>:187:in `loop'
from /Users/kddnewton/.rubies/ruby-yjit/lib/ruby/gems/3.4.0+0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
from /Users/kddnewton/.rubies/ruby-yjit/bin/irb:25:in `load'
from /Users/kddnewton/.rubies/ruby-yjit/bin/irb:25:in `<main>'
```
Do you have any `RUBYOPT` environment variables set?
----------------------------------------
Bug #20159: Prism assertion failure even if it is executed with --parser=parse.y
https://bugs.ruby-lang.org/issues/20159#change-106067
* Author: tompng (tomoya ishida)
* Status: Open
* Priority: Normal
* Assignee: kddnewton (Kevin Newton)
* ruby -v: ruby 3.4.0dev (2024-01-07T16:23:58Z master 8b86d6f0c1) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Prism fails to parse this code with assertion failed. Reported at https://github.com/ruby/prism/issues/1616
~~~ruby
<<A+%
A
~~~
Ruby exits with assertion failed even if it's run with option `--parser=parse.y`
~~~
# ruby -v
ruby 3.4.0dev (2024-01-07T16:23:58Z master 8b86d6f0c1) [x86_64-linux]
# (echo "<<A+%"; echo "A") > a.rb
# ruby --parser=parse.y a.rb
ruby: prism/util/pm_newline_list.c:42: pm_newline_list_append: Assertion `list->size == 0 || newline_offset > list->offsets[list->size - 1]' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
~~~
`eval` will correclty result in SyntaxError, `require` and `load` exits with assertion failed.
~~~ruby
# irb
irb(main):001> eval File.read('a.rb')
(irb):1:in `eval': (eval at (irb):1):1: unterminated string meets end of file (SyntaxError)
irb(main):002> load 'a.rb'
prism/util/pm_newline_list.c:42: pm_newline_list_append: Assertion `list->size == 0 || newline_offset > list->offsets[list->size - 1]' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
~~~
--
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/postorius/lists/ruby-core.ml.ruby-lang.org/