| Age | Commit message (Collapse) | Author |
|
(https://github.com/ruby/prism/pull/1899)
https://github.com/ruby/prism/commit/1b41c2d56c
|
|
|
|
Right now when you have a lot of string concats it ends up being
difficult to work with because of the depth of the tree. You end
up descending very far for every string literal that is part of the
concat.
There are already times when we use an interpolated string node to
group together two string segments that are part of the same string
(like when they are interupted by the contents of a heredoc). This
commit takes the same approach and replaces string concats with
interpolated string nodes.
Now that they're a flat list, they should be much easier to work
with. There's still some missing information here that would be
useful to consumers: whether or not there is _actually_ any
interpolation contained in the list. We could remedy this with
another node type that is named something like string list, or we
could add a flag to interpolated string node indicating that there
is interpolation. Either way I want to solve that in a follow-up
commit, since this commit is valuable on its own.
https://github.com/ruby/prism/commit/1e7ae3ad1b
|
|
The lookup in the table is using the wrong key when converting generic
instance variables to too complex, which means that it never looks up
the entry which leaks memory when the entry is overwritten.
|
|
|
|
|
|
|
|
Add a special treatment for when the argument of self is an
integral multiple of 45 degrees.
1i ** (10 ** 100) #=> 1+0i
1i ** (10 ** 100 + 1) #=> 0+1i
(1+1i) ** (10 ** 100) # warning: in a**b, b may be too big
#=> (Infinity+0.0i)
(1+1i) ** (10 ** 100 + 1) # warning: in a**b, b may be too big
#=> (Infinity+Infinity*i)
|
|
(https://github.com/ruby/prism/pull/1878)
Fix https://github.com/ruby/prism/pull/1832
https://github.com/ruby/prism/commit/060bcc81a8
|
|
(https://github.com/ruby/prism/pull/1796)
Previously, we only supported error messages that were constant
strings. This works for the most part, but there are some times
where we want to include some part of the source in the error
message to make it better.
For example, instead of "Token is reserved" it's better to write
"_1 is reserved".
To do this, we now support allocating error messages at runtime
that are built around format strings.
https://github.com/ruby/prism/commit/7e6aa17deb
|
|
(https://github.com/ruby/prism/pull/1801)
https://github.com/ruby/prism/commit/4c1391ea56
|
|
common code.
Merge the Big5 extensions into pm_big5.c
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.82 to 0.9.83.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.82...v0.9.83)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
https://github.com/rubygems/rubygems/commit/9eb6220c6c
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.82 to 0.9.83.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.82...v0.9.83)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
https://github.com/rubygems/rubygems/commit/41670ad4e2
|
|
(https://github.com/ruby/irb/pull/771)
I propose introducing the capability to set the IRB completion kinds via an environment variable, specifically `IRB_COMPLETOR=type`.
This feature aims to enhance the Rails console experience by allowing Rails users to specify their preferred completion more conveniently.
Currently, when using the Rails console, there's no straightforward way to globally set the type completion across a Rails application repository.
It's possible to configure this setting by placing a `.irbrc` file at the project root. However, using a .irbrc file is not ideal as it allows for broad configurations and can potentially affect the production environment.
My suggestion focuses on allowing users to set the completion to 'type' in a minimal.
This enhancement would be particularly beneficial for teams writing RBS in their Rails applications.
This type completer, integrated with RBS, would enhance completion accuracy, improving the Rails console experience.
https://github.com/ruby/irb/commit/032f6da25f
|
|
(https://github.com/ruby/prism/pull/1897)
https://github.com/ruby/prism/commit/00b76ef254
|
|
https://github.com/ruby/prism/commit/eec1862967
|
|
When transitioning generic instance variable objects to too complex, we
set the shape first before performing inserting the new gen_ivtbl. The
st_insert for the new gen_ivtbl could allocate and cause a GC. If that
happens, then it will crash because the object will have a too complex
shape but not yet be backed by a st_table.
This commit changes the order so that the insert happens first before
the new shape is set.
The following script reproduces the issue:
```
o = []
o.instance_variable_set(:@a, 1)
i = 0
o = Object.new
while RubyVM::Shape.shapes_available > 0
o.instance_variable_set(:"@i#{i}", 1)
i += 1
end
ary = 1_000.times.map { [] }
GC.stress = true
ary.each do |o|
o.instance_variable_set(:@a, 1)
o.instance_variable_set(:@b, 1)
end
```
|
|
|
|
Prior to this commit, we weren't recursing up scopes to look for
the local definition. With this commit, we do so, fixing local writes
within blocks
|
|
This PR implements the once node on interpolated regexes.
There is a bug in Prism where the interpolated regex with the once flag
only works when there is not a local variable so the test uses a "1".
We'll need to fix that.
|
|
|
|
(https://github.com/ruby/prism/pull/1886)
https://github.com/ruby/prism/commit/41462400b7
|
|
(https://github.com/ruby/prism/pull/1853)
* Add and test ibm863
* Remove dup encoding and add alias
* Update test/prism/encoding_test.rb
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
* Readd bitfield table lol
---------
https://github.com/ruby/prism/commit/4cd756d7ff
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
|
|
(https://github.com/ruby/prism/pull/1797)
https://github.com/ruby/prism/commit/c13165e6aa
|
|
(https://github.com/ruby/prism/pull/1880)
* feat: Adds macCroatian encoding
- Based on:
https://en.wikipedia.org/wiki/Mac_OS_Croatian_encoding
https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CROATIAN.TXT
Co-authored-by: Josefine Rost <nijrost@gmail.com>
* Use output from bin/encodings and adds to docs/encoding.md
---------
https://github.com/ruby/prism/commit/019a82d8f3
Co-authored-by: Josefine Rost <nijrost@gmail.com>
|
|
(https://github.com/ruby/prism/pull/1809)
https://github.com/ruby/prism/commit/d493ccd093
|
|
assignments
(https://github.com/ruby/prism/pull/1879)
Fix https://github.com/ruby/prism/pull/1541
https://github.com/ruby/prism/commit/9fb276e1f4
|
|
(https://github.com/ruby/prism/pull/1882)
* Fix parsing `...` in arguments
Fix https://github.com/ruby/prism/pull/1830
Fix https://github.com/ruby/prism/pull/1831
* Rename the constant name to PM_ERR_ARGUMENT_FORWARDING_UNBOUND
https://github.com/ruby/prism/pull/1882#discussion_r1398461156
https://github.com/ruby/prism/commit/519653aec2
|
|
|
|
(https://github.com/ruby/prism/pull/1884)
* feat: add encoding for IBM865
* style: fix incorrect autoformat
https://github.com/ruby/prism/commit/14c6ae0182
|
|
(https://github.com/ruby/prism/pull/1836)
* Don't add an invalid identifier capture to locals
Fix https://github.com/ruby/prism/pull/1815
* Delay creating a MatchWriteNode
https://github.com/ruby/prism/pull/1836#discussion_r1393716600
https://github.com/ruby/prism/commit/635f595a36
|
|
(https://github.com/ruby/prism/pull/1864)
Add encoding for ibm866
---------
https://github.com/ruby/prism/commit/1a96cc71f7
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
|
|
https://github.com/ruby/prism/commit/78d3fa7172
|
|
https://github.com/ruby/prism/commit/220b40921a
|
|
https://github.com/ruby/prism/commit/3ca9823eb4
|
|
Fixes https://github.com/ruby/prism/pull/1868
Related #1843
https://github.com/ruby/prism/commit/abc136dfc9
|
|
https://github.com/ruby/prism/commit/ff95edbd99
|
|
(https://github.com/ruby/irb/pull/764)
https://github.com/ruby/irb/commit/07e4d540cc
|
|
Commit e87d0882910001ef3b0c2ccd43bf00cee8c34a0c introduced a
regression where the keyword splat object passed by the caller
would be directly used by callee as keyword splat parameters,
if it implemented #to_hash. The return value of #to_hash would be
ignored in this case.
|
|
Reproduction script:
```
o = Object.new
10.times { |i| o.instance_variable_set(:"@a#{i}", i) }
i = 0
a = Object.new
while RubyVM::Shape.shapes_available > 2
a.instance_variable_set(:"@i#{i}", 1)
i += 1
end
o.remove_instance_variable(:@a0)
puts o.instance_variable_get(:@a1)
```
Before this patch, it would incorrectly output `2` and now it correctly
outputs `1`.
|
|
https://github.com/ruby/prism/commit/0670dd3b9a
|
|
https://github.com/ruby/prism/commit/56508c2201
|
|
https://github.com/ruby/prism/commit/f654058f50
|
|
https://github.com/ruby/prism/commit/42b20ee399
|
|
https://github.com/ruby/prism/commit/f1d56da58f
|
|
https://github.com/ruby/prism/commit/f0f057b055
|
|
https://github.com/ruby/prism/commit/8f40536431
|
|
https://github.com/ruby/prism/commit/2232d4b6a0
|
|
due to a failure on a CI
http://ci.rvm.jp/results/trunk-iseq_binary@ruby-sp2-docker/4779277
```
expected:
== disasm: #<ISeq:prism_test_forwarding_arguments_node1@<compiled>:2 (2,8)-(4,11)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: 1])
[ 1] "..."@0
0000 putself ( 3)
0001 getlocal_WC_0 ?@-2
0003 splatarray false
0005 getblockparamproxy ?@-1, 0
0008 send <calldata!mid:prism_test_forwarding_arguments_node, argc:1, ARGS_SPLAT|ARGS_BLOCKARG|FCALL>, nil
0011 leave ( 2)
actual:
== disasm: #<ISeq:prism_test_forwarding_arguments_node1@<compiled>:2 (2,8)-(4,11)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: 1])
[ 1] "..."@0
0000 putself ( 3)
0001 getlocal_WC_0 ?@-2
0003 splatarray false
0005 getblockparamproxy "!"@-1, 0
0008 send <calldata!mid:prism_test_forwarding_arguments_node, argc:1, ARGS_SPLAT|ARGS_BLOCKARG|FCALL>, nil
0011 leave ( 2)
/tmp/ruby/src/trunk-iseq_binary/tool/lib/iseq_loader_checker.rb:36:in `exit': exit (SystemExit)
```
|