| Age | Commit message (Collapse) | Author |
|
|
|
Extends the @_init guard to def_method so that an ERB object created
via Marshal.load (which bypasses initialize) raises ArgumentError
instead of evaluating arbitrary source. def_module and def_class both
delegate to def_method and are covered by the same check.
Co-authored-by: Tristan Madani <TristanInSec@gmail.com>
|
|
extension
|
|
|
|
https://github.com/ruby/pstore/commit/d93352e365
|
|
https://github.com/ruby/pstore/commit/bbb1e239f0
|
|
https://github.com/ruby/pstore/commit/74fe0e516b
|
|
Rather than overwriting the predicate method dynamically.
Fix [Bug #21880](https://bugs.ruby-lang.org/issues/21880).
https://github.com/ruby/pstore/commit/b2e474e619
|
|
https://github.com/ruby/pstore/commit/aab62bf4cf
|
|
https://github.com/ruby/pstore/commit/b563c4d354
|
|
https://github.com/ruby/pstore/commit/a63a70a830
|
|
[Feature #16495]
https://github.com/ruby/pstore/commit/6be4e72a66
|
|
https://github.com/ruby/pstore/commit/fa564a6965
|
|
[PATCH] marshal.c: properly freeze linked strings
[Bug #21961]
|
|
[Backport #21703]"
This reverts commit 83637aea6ea726f7fc4c17e56ac60c289e2d98db.
|
|
[Bug #21819] Data objects without members should also be frozen
|
|
[Bug #21814] Fix negative bignum modulo
If modulo is zero, do not apply bias even if the divisor is zero.
`BIGNUM_POSITIVE_P` is true even on bignum zero.
|
|
fix underflow
|
|
c26057ebafb23b063190d31d5b4d19a0e0a1306c: [Backport #21779]
[Bug #21779] Uniquify `InitVM` functions as well as `Init`
Avoid possible name conflict when `--with-static-linked-ext`.
[Bug #21779] Do not export InitVM functions
Fix ruby/io-console#105.
|
|
[PATCH] Fix refinement modification of method visibility in superclass
Previously, this didn't work correctly, resulting in a
SystemStackError. This fixes the issue by finding the related
superclass method entry, and updating the orig_me in the
refinement method to point to the superclass method.
Fixes [Bug #21446]
|
|
[PATCH] Don't use non blocking pipes for RUBY_CRASH_REPORT
[Bug #21703]
RUBY_CRASH_REPORT does not work in some cases when shelling out on Linux.
For example, given the following shell script dump.sh:
#!/usr/bin/env bash
cat > /tmp/crash
And we see it fails like this:
$ RUBY_CRASH_REPORT="|dump.sh" ruby -rfiddle -e "Fiddle::Pointer.new(1, 10)[0]"
cat: -: Resource temporarily unavailable
|
|
[PATCH] reinit rb_internal_thread_event_hooks_rw_lock at fork
[Bug #21959]
|
|
|
|
https://github.com/ruby/syntax_suggest/commit/b782897560d7749c183eb2ce4286455b4c680090
This commit didn't apply for some reason
|
|
https://github.com/ruby/syntax_suggest/commit/a81b92fcf2
[Bug #21847]
|
|
The reason this logic for different methods branches in the class instead of internally was to be eagerly aggressive about runtime performance. This code is currently only used once for the document where it's invoked ~N times (where N is number of lines):
```ruby
module SyntaxSuggest
class CleanDocument
# ...
def join_trailing_slash!
trailing_groups = @document.select(&:trailing_slash?).map do |code_line|
take_while_including(code_line.index..) { |x| x.trailing_slash? }
end
join_groups(trailing_groups)
self
end
```
Since this is not currently a hot-spot I think merging the branches and using a case statement is a reasonable tradeoff and avoids the need to do specific version testing.
An alternative idea was presented in #241 of behavior-based testing for branch logic (which I would prefer), however, calling the code triggered requiring a `DelegateClass` when the `syntax_suggest/api` is being required.
https://github.com/ruby/syntax_suggest/commit/ab122c455f
|
|
It used to not emit this token type, but now it does.
So when a newer version of prism is present, we can fall back
to the same code that ripper uses.
Ref:
* https://github.com/ruby/ruby/pull/15914
* https://github.com/ruby/prism/pull/3859
https://github.com/ruby/syntax_suggest/commit/42a3b8f6cb
|
|
https://github.com/ruby/syntax_suggest/commit/54bb8ab330
|
|
https://github.com/ruby/syntax_suggest/commit/ce7b87184e
|
|
https://github.com/ruby/syntax_suggest/commit/ea73ed586a
|
|
https://github.com/ruby/syntax_suggest/commit/e99b5ba287
|
|
https://github.com/ruby/syntax_suggest/commit/8c36b0cb35
|
|
https://github.com/ruby/syntax_suggest/commit/9c78283363
|
|
https://github.com/ruby/syntax_suggest/commit/b17bf0baca
|
|
In #225 it was reported that the output looks incorrect:
```
$ cat /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
def x.y.z
end
$ ruby /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
/tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb: --> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
expected a delimiter to close the parametersunexpected '.', ignoring it
> 1 def x.y.z
> 2 end
```
Specifically:
```
expected a delimiter to close the parametersunexpected '.', ignoring it
```
However this does not show up when executing the debug executable:
```
$ bin/bundle exec exe/syntax_suggest /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
--> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
expected a delimiter to close the parameters
unexpected '.', ignoring it
> 1 def x.y.z
> 2 end
```
This is because `exe/syntax_suggest` uses STDOUT.puts while calling `ruby` with the filename uses a fake IO object represented by MiniStringIO. This class was incorrectly not adding a newline to the end of the print.
The fix was to move the class to it's own file where it can be tested and then fix the behavior.
close https://github.com/ruby/syntax_suggest/pull/225
https://github.com/ruby/syntax_suggest/commit/d2ecd94a3b
Co-authored-by: Andy Yong <andyywz@gmail.com>
|
|
|
|
Fixes [Bug #21266].
Backport of 9168cad4d63a5d281d443bde4edea6be213b0b25 to 3.3
|
|
|
|
[Bug #21931]
Keep tmp alive while RARRAY_CONST_PTR(tmp) is used by rb_str_format.
[alan: sunk the guard below usage]
Reviewed-by: Alan Wu <XrXr@users.noreply.github.com>
|
|
#21873]
Method#unbind clones the method entry, preserving its defined_class.
For methods mixed in via include/extend, defined_class is an ICLASS,
causing UnboundMethod#== to return false when comparing against the
same method obtained via Module#instance_method.
Resolve ICLASS defined_class in method_eq.
[Bug #21873]
|
|
[Bug #21860]
If a thread was holding this lock before fork, it will not exist in the
child process. We should re-initialize these locks as we do with the VM
locks when forking.
Co-Authored-By: John Hawthorn <john@hawthorn.email>
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
search_nonascii(): Replace UB pointer cast with memcpy
Casting a pointer to create an unaligned one is undefined behavior in C
standards. Use memcpy to express the unaligned load instead to play by
the rules.
Practically, this yields the same binary output in many situations
while fixing the crash in [Bug #21715].
|
|
|
|
|
|
|
|
16 beta
|
|
|
|
[PATCH] [Bug #21705] Fix segfaults on Windows
It should check the type of the argument and coercion before
converting the encoding.
|
|
[PATCH] [Bug #21680] Fix (base**power_of_two).digits(base) bug (#15144)
Fix wrong condition in base multiplying loop.
|
|
[PATCH] [Bug #21666] Get rid of use of unspecified values
|