| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Prior to this commit, we were not accounting for the case of a nil
parent in a CallXPathWriteNode, for example ::A ||= 1. This commit
checks if the parent exists, and if not, uses Object as the inferred
parent
|
|
|
|
| |
https://github.com/ruby/bigdecimal/commit/581725d4e5
|
|
|
|
|
| |
The bug in i686 was fixed in commit
71babe5536bdb2238509752d8706194ee57ff485.
|
|
|
|
| |
https://github.com/ruby/bigdecimal/commit/2edd8d0a23
|
|
|
|
|
|
|
|
| |
The locals_body_index gives the index in the locals array where
the locals from the body start. This allows compilers to easily
index past the parameters in the locals array.
https://github.com/ruby/prism/commit/5d4627b890
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby code:
```ruby
defined? 1 in 1
```
Instructions:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,16)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,16)>
0000 putobject "expression"
0002 leave
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby code:
```ruby
defined? [a: [:b, :c]]
```
Instructions (without optimizations):
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)>
== catch table
| catch type: rescue st: 0001 ed: 0007 sp: 0000 cont: 0009
| == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)>
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
| [ 1] "$!"@0
| 0000 putnil
| 0001 leave
|------------------------------------------------------------------------
0000 putnil
0001 putobject true
0003 branchunless 9
0005 putobject "expression"
0007 swap
0008 pop
0009 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)>
== catch table
| catch type: rescue st: 0000 ed: 0009 sp: 0000 cont: 0009
| == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)>
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
| [ 1] "$!"@0
| 0000 putnil
| 0001 leave
|------------------------------------------------------------------------
0000 putnil
0001 putobject true
0003 branchunless 9
0005 putobject "expression"
0007 swap
0008 pop
0009 leave
```
Instructions (with optimizations):
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)>
== catch table
| catch type: rescue st: 0001 ed: 0003 sp: 0000 cont: 0005
| == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)>
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
| [ 1] "$!"@0
| 0000 putnil
| 0001 leave
|------------------------------------------------------------------------
0000 putnil
0001 putobject "expression"
0003 swap
0004 pop
0005 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)>
== catch table
| catch type: rescue st: 0000 ed: 0005 sp: 0000 cont: 0005
| == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)>
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
| [ 1] "$!"@0
| 0000 putnil
| 0001 leave
|------------------------------------------------------------------------
0000 putnil
0001 putobject "expression"
0003 swap
0004 pop
0005 leave
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In an array for `defined?` we need to check if there is a
`contains_splat` flag, if so bail early.
Ruby code:
```ruby
defined?([[*1..2], 3, *4..5])
```
Instructions:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,29)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,29)>
0000 putobject "expression"
0002 leave
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby code:
```ruby
defined?(__LINE__)
```
Instructions:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)>
0000 putobject "expression"
0002 leave
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby code:
```ruby
defined?(__FILE__)
```
Instructions:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)>
0000 putobject "expression"
0002 leave
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby code:
```ruby
defined?(__ENCODING__)
```
Instructions:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,22)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,22)>
0000 putobject "expression"
0002 leave
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby Code:
```
defined?(1i)
```
Instructions:
```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)>
0000 putobject "expression"
0002 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)>
0000 putobject "expression"
0002 leave
```
|
| |
|
|
|
|
| |
https://github.com/ruby/prism/commit/5f0ea09785
|
| |
|
|
|
|
|
|
| |
Method documentation must be placed immediately before each
implementation, without any other functions or preprocessor
directives.
|
|
|
|
|
|
|
| |
`bundle exec ruby foo.rb` ignore to load gem_prelude.rb. Because warnings feature
is not working with `bundle exec ruby`.
https://github.com/rubygems/rubygems/commit/a0d4ed92a7
|
|
|
|
|
|
|
| |
When followed by non-space characters, rather it looks like a URL or a
path name on Windows.
https://github.com/ruby/rdoc/commit/72c6560773
|
|
|
|
| |
https://github.com/ruby/rdoc/commit/1904e9076d
|
|
|
|
| |
https://github.com/ruby/rdoc/commit/4ac9be7f48
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that when DNS connection is enabled, but the TCP connection is
disabled in a way, the `Net::HTTP.connect` raises `Net::OpenTimeout`.
And I want to skip the tests in this case.
https://github.com/ruby/net-http/blob/042faf74e77d786ff60dff81555f6ec4f21e77a9/lib/net/http.rb#L1601-L1608
```
1) Error:
TestBundledCA#test_accessing_new_index:
Net::OpenTimeout: execution expired
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `initialize'
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `open'
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `block in connect'
/builddir/build/BUILD/ruby-3.0.4/lib/timeout.rb:107:in `timeout'
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:985:in `connect'
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:970:in `do_start'
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:959:in `start'
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:1512:in `request'
/builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:1270:in `get'
/builddir/build/BUILD/ruby-3.0.4/test/rubygems/test_bundled_ca.rb:34:in `assert_https'
/builddir/build/BUILD/ruby-3.0.4/test/rubygems/test_bundled_ca.rb:58:in `test_accessing_new_index'
...
```
https://github.com/rubygems/rubygems/commit/5defe0a2f6
|
|
|
|
| |
https://github.com/rubygems/rubygems/commit/46258d6cb4
|
|
|
|
| |
This reverts commit 9b76c7fc89460ed8e9be40e4037c1d68395c0f6d.
|
| |
|
|
|
|
| |
`map`. (#9131)
|
|
|
|
|
|
|
|
| |
For this public API, the callback is declared to take
`(ID, VALUE, st_data_t)`, but it so happens that using
`(st_data_t, st_data_t, st_data_t)` also
type checks, because the underlying type is identical.
Use it as declared and get rid of some casts.
|
| |
|
|
|
|
|
|
|
|
|
| |
Looks for the CHECKSUMS section in the lockfile, activating the feature
only if the section exists. Without a CHECKSUMS section, Bundler will
continue as normal, validating checksums when gems are installed while
checksums from the compact index are present.
https://github.com/rubygems/rubygems/commit/2353cc93a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible to write the following and have it be valid Ruby:
```
defined?("foo"
)
```
But Prism wasn't taking the new line into account. This adds an
`accept1` for a `PM_TOKEN_NEWLINE` to account for this. I've also
updated the fixtures and snapshots to test this.
https://github.com/ruby/prism/commit/b87f8eedc6
|
|
|
|
|
|
|
|
| |
The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like https://github.com/ruby/ruby/actions/runs/7104601478/job/19339940315.
This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle.
https://github.com/ruby/syntax_suggest/commit/4b6abb763e
|
|
|
|
| |
Helps understand page switching
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have received a report of `assert!( !cb.has_dropped_bytes())` in
set_page() failing. The only explanation for this seems to be memory
allocation failing in write_byte(). The if condition implies that
`current_write_pos < dst_pos < mem_size`, which rules out failing to
encode the relative jump. The has_capacity() assert above not tripping
implies that we were in a place in the page where write_byte() did
attempt to write the byte and potentially made a syscall in the process.
Remove the assert, since memory allocation could fail. Also, return
failure if the destination is outside of the code region to detect that
out-of-memory situation quicker.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```
Expected a newline or semicolon after the statement
Cannot parse the expression
Expected a newline or semicolon after the statement
Cannot parse the expression
1 describe "webmock tests" do
22 it "body" do
27 query = Cutlass::FunctionQuery.new(
> 28 port: port
> 29 body: body
30 ).call
34 end
35 end
```
After:
```
Expected a newline or semicolon after the statement
Cannot parse the expression
1 describe "webmock tests" do
22 it "body" do
27 query = Cutlass::FunctionQuery.new(
> 28 port: port
> 29 body: body
30 ).call
34 end
35 end
```
https://github.com/ruby/syntax_suggest/commit/becf097e5e
|
|
|
|
|
|
| |
Removes or updates mentions of Ripper
https://github.com/ruby/syntax_suggest/commit/08aaa3f50a
|
|
|
|
| |
https://github.com/ruby/syntax_suggest/commit/7f4176a914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.
Todo:
- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism
https://github.com/ruby/syntax_suggest/commit/a7d6991cc4
|
|
|
|
|
|
|
|
|
|
| |
Enable Prism using either --prism
ruby --prism test.rb
or via env var
RUBY_PRISM=1 ruby test.rb
|
| |
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/801)
https://github.com/ruby/irb/commit/a1e431bd83
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/802)
https://github.com/ruby/irb/commit/173980974b
|
|
|
|
|
|
|
|
|
|
|
| |
(https://github.com/ruby/irb/pull/800)
For apps/libs that test against IRB, it's recommended to set `TERM=dumb`
so they get minimum disruption from Reline's interactive-focus features.
Therefore, we should follow the convention to disable pager when `TERM=dumb`.
https://github.com/ruby/irb/commit/8a3002a39e
|
|
|
|
| |
https://github.com/ruby/prism/commit/694d3d7279
|
|
|
|
|
|
| |
https://github.com/ruby/prism/pull/1949#discussion_r1412568793
https://github.com/ruby/prism/commit/a00f21d10a
|
|
|
|
| |
https://github.com/ruby/prism/commit/e91f8dbb99
|
|
|
|
|
|
|
|
| |
https://github.com/ruby/prism/pull/1949#discussion_r1410733341
https://github.com/ruby/prism/commit/27635da821
Co-Authored-By: Kevin Newton <kddnewton@gmail.com>
|