| Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
[PATCH] [ruby/timeout] Compatibility with Fiber scheduler. (https://github.com/ruby/timeout/pull/97)
[Bug #21947]
https://github.com/ruby/timeout/commit/55d7c84b50
|
|
|
|
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>
|
|
[Backport #21187]
|
|
|
|
[PATCH] Improve performance of UnicodeNormalize.canonical_ordering_one
Use array_of_integer.sort! instead of buble-sort-like algorithm
|
|
https://github.com/ruby/rubygems/commit/bc77ec0bf2
|
|
|
|
|
|
|
|
|
|
The purpose of this commit is to fix Bug #21188. We need to detect when
stdin has run in to an EOF case. Unfortunately we can't _call_ the eof
function on IO because it will block.
Here is a short script to demonstrate the issue:
```ruby
x = STDIN.gets
puts x
puts x.eof?
```
If you run the script, then type some characters (but _NOT_ a newline),
then hit Ctrl-D twice, it will print the input string. Unfortunately,
calling `eof?` will try to read from STDIN again causing us to need a
3rd Ctrl-D to exit the program.
Before introducing the EOF callback to Prism, the input loop looked
kind of like this:
```ruby
loop do
str = STDIN.gets
process(str)
if str.nil?
p :DONE
end
end
```
Which required 3 Ctrl-D to exit. If we naively changed it to something
like this:
```ruby
loop do
str = STDIN.gets
process(str)
if STDIN.eof?
p :DONE
end
end
```
It would still require 3 Ctrl-D because `eof?` would block. In this
patch, we're wrapping the IO object, checking the buffer for a newline
and length, and then using that to simulate a non-blocking eof? method.
This commit wraps STDIN and emulates a non-blocking `eof` function.
[Backport #21188]
|
|
(#13327)
* [ruby/prism] Accept a newline after the defined? keyword
[Bug #21197]
https://github.com/ruby/prism/commit/22be955ce9
* Fix a compilation error
Co-authored-by: Stan Lo <stan001212@gmail.com>
---------
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
|
|
|
|
|
|
|
|
b48b841378f80e16378ceb83f3b78e52df9ae023, 2fe8b9cd3d308d754f3d33a948dfb1dd782a10dc: [Backport #21327]
Fix redefinition of `clock_gettime` and `clock_getres`
winpthreads-git 12.0.0.r720 provides `clock_gettime` and
`clock_getres` as inline functions.
digest.so needs ruby/digest.h which is installed by build-ext
Copy to path with the base name
|
|
[Backport #21197]"
This reverts commit e630a0f7ae909dafe2e1dbc47baf90cd795b4a5f.
|
|
[ruby/prism] Accept a newline after the defined? keyword
[Bug #21197]
https://github.com/ruby/prism/commit/22be955ce9
|
|
|
|
|
|
One error message that we parse is now slightly different.
https://github.com/rubygems/rubygems/commit/758528791d
|
|
|
|
|
|
|
|
|
|
|
|
[ruby/prism] No writing to numbered parameters
Fixes [Bug #21117]
https://github.com/ruby/prism/commit/19d4bab5a0
|
|
[ruby/prism] Fix `not` receiver
`not foo` should be `!foo`
`not()` should be `!nil`
Fixes [Bug #21027]
https://github.com/ruby/prism/commit/871ed4b462
|
|
A tentative workaround for duplicate entries in "Class and Module
Index".
Notes:
Merged: https://github.com/ruby/ruby/pull/12463
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12439
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12444
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12412
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12412
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/9815
|
|
1. Store the `PKG_CONFIG` variable in Makefile.sub (or try to get it from the ENV var PKG_CONFIG in mkmf.rb)
2. Try to use --msvc-syntax, with a fallback to replacing -Lxxx with -libpath:xxx. --msvc-syntax has been in pkgconf since 1.4.0 (released 7 years ago). pkg-config (freedesktop), does not support it, hence the fallback.
3. The `try_ldflags` passes these `ldflags` as the `opt` parameter to the `link_command`, not as `ldflags`. Unix systems are forgiving in that regard, MSVC is not: as a result as passing them as `opt`, they (specifically the `/libpath:xxx` ones) end up passed before the `-link` command to `cl.exe` and it throws because it ignores it and therefore can't find the lib.
```
cl : Command line warning D9002 : ignoring unknown option '-libpath:C:/Users/julien/.conan2/p/libff3726d89a6255c/p/lib'
```
Notes:
Merged: https://github.com/ruby/ruby/pull/9815
|
|
https://github.com/ruby/logger/commit/216cedef7c
|
|
`/dev/null` is not available on wasm.
https://github.com/ruby/logger/commit/4be05c2208
|
|
https://github.com/ruby/rdoc/commit/2b79892ab4
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
(https://github.com/ruby/rdoc/pull/1238)
Hide navigation sidebar when clicking anchor links on mobile devices.
Previously, anchor links would change the page but the navigation
sidebar would block the view.
https://github.com/ruby/rdoc/commit/f12a96b7fa
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
(https://github.com/ruby/irb/pull/1050)
https://github.com/ruby/irb/commit/49050f9bf3
Notes:
Merged: https://github.com/ruby/ruby/pull/12394
|
|
|
|
|
|
|