| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Prior to this commit, we weren't accounting for hidden variables
on the locals table, so we would have inconsistencies on the stack.
This commit fixes params, and introduces a hidden_variable_count
on the scope, both of which fix parameters.
|
|
|
|
Previously numbered parameters were a field on blocks and lambdas
that indicated the maximum number of numbered parameters in either
the block or lambda, respectively. However they also had a
parameters field that would always be nil in these cases.
This changes it so that we introduce a NumberedParametersNode that
goes in place of parameters, which has a single uint8_t maximum
field on it. That field contains the maximum numbered parameter in
either the block or lambda.
As a part of the PR, I'm introducing a new UInt8Field type that
can be used on nodes, which is just to make it a little more
explicit what the maximum values can be (the maximum is actually 9,
since it only goes up to _9). Plus we can do a couple of nice
things in serialization like just read a single byte.
https://github.com/ruby/prism/commit/2d87303903
|
|
|
|
|
|
https://github.com/ruby/prism/commit/f4c80c67dc
|
|
The problem was deeper than just looking back a single token.
You can push the heredoc_end token way back into the list.
We need to save the last location of a heredoc end to see if
it's the last token in the file.
Fixes https://github.com/ruby/prism/pull/1954
https://github.com/ruby/prism/commit/91dfd4eecd
|
|
Now, `PM_DEBUG_LOGGING` can be available.
https://github.com/ruby/prism/commit/569ffacb5f
|
|
Fix https://github.com/ruby/prism/pull/1946
This fixes to set an error position for unterminated strings to the
opening delimiters. Previously, the error position was set to the end
of the delimiter.
The same fix applies to other string-like literals.
Additionally, this fixes https://github.com/ruby/prism/pull/1946; that is, it adds the last part of the
string even though the string literal does not terminate.
https://github.com/ruby/prism/commit/c1240baafd
|
|
I don't know when it is changed, but the `not_provided` signature is
changed.
https://github.com/ruby/prism/commit/0255cc307d
|
|
|
|
|
|
|
|
https://github.com/ruby/prism/commit/97b296a0f7
|
|
|
|
|
|
> https://github.com/flori/json/pull/525
> Rename escape_slash in script_safe and also escape E+2028 and E+2029
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
> https://github.com/flori/json/pull/454
> Remove unnecessary initialization of create_id in JSON.parse()
Co-authored-by: Watson <watson1978@gmail.com>
|
|
It is rather common to directly interpolate JSON string inside
<script> tags in HTML as to provide configuration or parameters to a
script.
However this may lead to XSS vulnerabilities, to prevent that 3
characters need to be escaped:
- `/` (forward slash)
- `U+2028` (LINE SEPARATOR)
- `U+2029` (PARAGRAPH SEPARATOR)
The forward slash need to be escaped to prevent closing the script
tag early, and the other two are valid JSON but invalid Javascript
and can be used to break JS parsing.
Given that the intent of escaping forward slash is the same than escaping
U+2028 and U+2029, I chos to rename and repurpose the existing `escape_slash`
option.
|
|
They are allocated with ruby_xmalloc, they should be freed with
ruby_xfree.
|
|
https://github.com/flori/json/commit/ca546128f2
|
|
Previously in the JSON::Ext parser, when we encountered an "Infinity"
token (and weren't allowing NaN/Infinity) we would try to display the
"unexpected token" at the character before.
https://github.com/flori/json/commit/42ac170712
|
|
Require tests/lib/helper.rb to avoid:
NoMethodError: undefined method `assert_separately'
https://github.com/flori/json/commit/a81bcc0328
|
|
|
|
|
|
|
|
|
|
https://github.com/ruby/ruby/pull/9088#discussion_r1411490445
|
|
The test for Socket::ResolutionError#error_code fails in the FreeBSD environment with this test condition. Because Socket::ResolutionError#error_code returns Socket::EAI_FAIL instead of Socket::EAI_FAMILY.
https://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20231130T103002Z.fail.html.gz
This PR avoids the test failure by relaxing the condition.
Also changed the domain for testing to `example.com`.
|
|
https://github.com/ruby/prism/commit/ce4c67fb3a
|
|
|
|
https://github.com/ruby/prism/commit/b9510aed40
|
|
https://github.com/ruby/prism/commit/f4b7beadc9
|
|
https://github.com/ruby/prism/commit/c52c7f37ea
|
|
https://github.com/ruby/prism/commit/98e218d989
|
|
https://github.com/ruby/prism/commit/9461384b0c
|
|
|
|
https://github.com/ruby/prism/commit/2d5b9c2b3c
|
|
https://github.com/ruby/prism/commit/edfb54f039
|
|
https://github.com/ruby/prism/commit/7ddf651bab
|
|
https://github.com/ruby/prism/commit/ca3ab7ec89
|
|
https://github.com/ruby/prism/commit/4c06b6c42e
|
|
|
|
https://github.com/ruby/prism/commit/ba5218385a
|
|
https://github.com/ruby/prism/commit/d040337ce9
|
|
|
|
|