| Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/prism/commit/709fb6e09f
|
|
* YJIT: Cancel on-stack jit_return on invalidation
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
* Use RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P
---------
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
|
|
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
|
|
|
|
Instead of incrementing the depth using call by reference as we're
recursing up the stack we could instead store an offset for each known
scope where we know the depth is going to represented differently in the
Prism ast.
|
|
it matters.
https://github.com/rubygems/rubygems/commit/61b0947225
|
|
(https://github.com/ruby/irb/pull/784)
* Page evaluation result's output
This will make it easier to work with long output that exceeds the terminal's height.
* Use consistent TERM in rendering tests
This makes sure we get consistent result on all platforms.
https://github.com/ruby/irb/commit/4fedce93d3
|
|
https://github.com/ruby/rdoc/commit/dc56f6d0bd
|
|
It's possible for `defined?(A::B::C)` to raise an exception. `defined?`
must swallow the exception and return nil, so this commit adds a rescue
entry for `defined?` expressions on constant paths
|
|
Fixes https://github.com/ruby/prism/pull/1874
https://github.com/ruby/prism/commit/304dd78dd2
|
|
|
|
I noticed that `deconstruct` and `hash` don't have enough coverage.
The behavior of `hash` is documented so I copied it.
|
|
https://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20231130T103002Z.fail.html.gz
|
|
https://github.com/ruby/cgi/commit/92fdb3316b
|
|
|
|
rsock_raise_socket_error is called only when getaddrinfo and getaddrname fail
|
|
We need to guard match from GC because otherwise it could end up being
reclaimed or moved in compaction.
|
|
|
|
Prism introduced a new ImplicitRestNode. This adds tests for the
ImplicitRestNode cases, and changes one assert which is no longer
accurate.
|
|
This commit fixes a bug with locals in ensure nodes by setting
the local tables correctly. It also changes accessing locals to
look at local tables in parent scopes, and account for this
correctly on depths of get or setlocals.
|
|
MacJapanese (also aliased as MacJapan) is a modified Shift_JIS
encoding, but is implemented identically in Ruby
https://github.com/ruby/prism/commit/9e0a097699
|
|
implementation
(https://github.com/ruby/irb/pull/772)
https://github.com/ruby/irb/commit/a4868a5373
|
|
https://github.com/ruby/prism/commit/9c2d1cf4ba
|
|
|
|
Ruby allows for 0 or negative line start, this is often used
with `eval` calls to get a correct offset when prefixing a snippet.
e.g.
```ruby
caller = caller_locations(1, 1).first
class_eval <<~RUBY, caller.path, caller.line - 2
# frozen_string_literal: true
def some_method
#{caller_provided_code_snippet}
end
RUBY
```
https://github.com/ruby/prism/commit/0d14ed1452
|
|
When dividing near the precision limit of `double`, use Bignum
division to get rid of rounding errors.
|
|
|
|
Fix https://github.com/ruby/prism/pull/1936
https://github.com/ruby/prism/commit/232e77a003
|
|
|
|
|
|
|
|
Fundamentally, `foo { |bar,| }` is different from `foo { |bar, *| }`
because of arity checks. This PR introduces a new node to handle
that, `ImplicitRestNode`, which goes in the `rest` slot of parameter
nodes instead of `RestParameterNode` instances.
This is also used in a couple of other places, namely:
* pattern matching: `foo in [bar,]`
* multi target: `for foo, in bar do end`
* multi write: `foo, = bar`
Now the only splat nodes with a `NULL` value are when you're
forwarding, as in: `def foo(*) = bar(*)`.
https://github.com/ruby/prism/commit/dba2a3b652
|
|
Prior to this commit, we were conflating the size of the locals
list with the number of parameters. This commit distinguishes
the two, and fixes a related bug which would occur if we set a local
that was not a parameter
|
|
We are aware at parse time how many numbered parameters we have
on a BlockNode or LambdaNode, but prior to this commit, did not
store that information anywhere in its own right.
The numbered parameters were stored as locals, but this does not
distinguish them from other locals that have been set, for example
in `a { b = 1; _1 }` there is nothing on the AST that distinguishes
b from _1.
Consumers such as the compiler need to know information about how
many numbered parameters exist to set up their own tables around
parameters. Since we have this information at parse time, we should
compute it here, instead of deferring the work later on.
https://github.com/ruby/prism/commit/bf4a1e124d
|
|
Followup: https://github.com/ruby/ruby/pull/9029
[Bug #20019]
Some events still weren't triggered from the right place.
The test suite was also improved a bit more.
|
|
There was a bug with the rest argument in SplatNodes, this commit
fixes it, and adds more tests illustrating the behavior of
SplatNodes
|
|
|
|
Previously, we didn't invalidate the method entry wrapped by
VM_METHOD_TYPE_REFINED method entries which could cause calls to
land in the wrong method like it did in the included test.
Do the invalidation, and adjust rb_method_entry_clone() to accommodate
this new invalidation vector.
Fix: cfd7729ce7a31c8b6ec5dd0e99c67b2932de4732
See-also: e201b81f79828c30500947fe8c8ea3c515e3d112
|
|
This impacted other tests. Please mind the commons.
/home/runner/work/ruby/ruby/src/test/ruby/test_compile_prism.rb:394: warning: already initialized constant Bar
/tmp/test_reline_config_60145/bazbarbob.rb:6: warning: previous definition of Bar was here
1) Failure:
TestModule#test_const_get_evaled [/home/runner/work/ruby/ruby/src/test/ruby/test_module.rb:1239]:
NameError expected but nothing was raised.
|
|
https://github.com/ruby/prism/commit/1e6ecbaf04
|
|
It is for supporting `def foo(bar = (def baz(bar) = bar; 1)) = 2` case.
https://github.com/ruby/prism/commit/c789a833c5
|
|
https://github.com/ruby/prism/commit/896915de24
|
|
Fix https://github.com/ruby/prism/pull/1637
https://github.com/ruby/prism/commit/0172d69cba
|
|
* Remove trailing spaces
* Migrate show_source tests to integration tests
Because show_source tests often need to define class and/or methods,
they can easily leak state to other tests. Changing them to integration
tests will ensure that they are run in a clean environment.
* Fix NoMethodError caused by SourceFinder#method_target
https://github.com/ruby/irb/commit/3c39f13397c72a8db24e50afdcb8942e6c4ea12f
|
|
want to access a methods origin definition. It allows for chaining
of multiple esses to further go up the classes as needed.
(https://github.com/ruby/irb/pull/770)
https://github.com/ruby/irb/commit/eec1329d5a
|
|
prompt
(https://github.com/ruby/irb/pull/791)
Currently, IRB just terminates if `main.to_s` raises while IRB
constructs the prompt string. This can easily happen if the user wants
to start an IRB session in the instance scope of an uninitialized
object, for example:
```
class C
def initialize
binding.irb
@values = []
end
def to_s = @values.join(',') # raises if uninitialized
end
C.new
```
This patch makes IRB rescue from such an exception and displays the
class name of the exception instead of `main.to_s` to indicate some
error has occurred.
We may display more detailed information about the exception, but this
patch chooses not to do so because 1) the prompt has limited space,
2) users can evaluate `to_s` in IRB to examine the error if they want,
and 3) obtaining the details can also raise, which requires nested
exception handling and can be complicated.
https://github.com/ruby/irb/commit/412ab26067
|
|
Fix https://github.com/ruby/prism/pull/1924
https://github.com/ruby/prism/commit/7cde900065
|
|
https://github.com/ruby/prism/commit/42b60b6e95
|
|
|
|
I don't prefer this style, but it appears that a plurality of syntax
error messages between with un-capitalized messages in CRuby, so
we'll go with that for consistency, for now.
https://github.com/ruby/prism/commit/b02df68954
|