| Age | Commit message (Collapse) | Author |
|
(https://github.com/ruby/reline/pull/522)
* Add unassigned escape sequence matcher to KeyStroke
* Do not insert ESC and unassigned ESC+key to input buffer
|
|
(https://github.com/ruby/reline/pull/566)
* Avoid referencing IOGate from IOGate classes
The only time those classes being used is when themselves being the IOGate.
So when referencing to IOGate, it's better to use `self` instead.
* Avoid referencing to IOGate from LineEditor directly
* Avoid referencing to IOGate from Core directly
* Reference to Reline.core directly
* Replace Reline::IOGate with Reline.core.io_gate
|
|
It got out of sync again. After this re-sync, it should happen
cherry-picking automatically.
Notes:
Merged-By: jemmaissroff
|
|
base64 gem to bundled gems in ruby/ruby.
https://github.com/rubygems/rubygems/commit/221797cfd1
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8007
|
|
(https://github.com/ruby/reline/pull/560)
https://github.com/ruby/reline/commit/4680d1c9e0
|
|
https://github.com/ruby/bigdecimal/commit/f63544d465
|
|
(https://github.com/ruby/reline/pull/562)
https://github.com/ruby/reline/commit/4348354604
|
|
|
|
(https://github.com/ruby/irb/pull/623)
* Rename `ext/history.rb` to `ext/eval_history.rb`
To confusion with `lib/irb/history.rb`
* Add eval_history tests
* Rename eval_history's History to EvalHistory to avoid confusion
|
|
(https://github.com/ruby/irb/pull/613)
Since `IRB.conf[:SAVE_HISTORY]` is assigned with 1000 by default, history-saving
is a feature enabled by default. So it should not be treated as an extension,
which adds unnecessary complexity to the code.
|
|
the caller
(https://github.com/ruby/timeout/pull/34)
* see discussion in
https://github.com/ruby/timeout/pull/30#issuecomment-1616179651
|
|
Fix https://bugs.ruby-lang.org/issues/18933
https://github.com/ruby/tmpdir/commit/446e636434
|
|
This fixes an infinite loop possible after ec3542229b29ec93062e9d90e877ea29d3c19472.
For \u{} escapes in regexps, skip validation in the parser, and rely on the regexp
code to handle validation. This is necessary so that invalid unicode escapes in
comments in extended regexps are allowed.
Fixes [Bug #19750]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/8003
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
(https://github.com/ruby/irb/pull/618)
* Test last value is assigned with measure enabled
* Remove unnecessary `result` variable
`Context#evaluate` always assigns the result of the evaluation to `_` so
we don't need to do it in `Irb#eval_input`.
* Move benchmarking logic into `Context#evaluate`
Current location of the benchmarking logic is too high up and includes
operations like command loading and argument transformation, which should
be excluded. So this commit moves it into `Context#evaluate` to reduce the
noise.
We don't move it further down to `Workspace#evaluate` because `Context`
is an argument of the measure block, which is not available in `Workspace`.
|
|
(https://github.com/ruby/irb/pull/607)
https://github.com/ruby/irb/commit/9d97a192a5
|
|
Hash#replace can leak memory if the receiver has an ST table.
Notes:
Merged: https://github.com/ruby/ruby/pull/8001
|
|
Test for commit f0d08d11dcd404f3146c0d71d6ff743bbc6e7193.
|
|
https://hackerone.com/reports/1958260
https://github.com/ruby/uri/commit/9d7bcef1e6
|
|
https://hackerone.com/reports/1958260
https://github.com/ruby/uri/commit/9010ee2536
|
|
The test times out on some platforms, so increase the timeout.
Notes:
Merged: https://github.com/ruby/ruby/pull/7992
|
|
(https://github.com/ruby/irb/pull/619)
https://github.com/ruby/irb/commit/b7b071774f
|
|
The following script leaks memory in Ripper:
```ruby
require "ripper"
20.times do
100_000.times do
Ripper.parse("")
end
puts `ps -o rss= -p #{$$}`
end
```
Notes:
Merged: https://github.com/ruby/ruby/pull/7985
|
|
|
|
GitHub: fix https://github.com/ruby/csv/pull/279
It's happen when:
* `keep_start`/`keep_{drop,back}` are nested.
(e.g.: `strip: true, skip_lines: /.../`)
* Row separator is `\r\n`.
* `InputScanner` is used. (Small input doesn't use `InputScanner`)
Reported by Gabriel Nagy. Thanks!!!
https://github.com/ruby/csv/commit/183635ab56
|
|
https://github.com/ruby/fiddle/commit/4598e6cd50
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/100
Reported by David M. Lary. Thanks!!!
https://github.com/ruby/fiddle/commit/516333dd78
|
|
(https://github.com/ruby/fiddle/pull/123)
This commit adds two new methods, `Fiddle::Pointer.read` and
`Fiddle::Pointer.write`. Both methods take an address, and will read or
write bytes at that address respectively.
For example we can read from an address without making a Pointer object:
```ruby
Fiddle::Pointer.read(address, 5) # read 5 bytes
```
We can also write to an address without allocating a Pointer object:
```ruby
Fiddle::Pointer.write(address, "bytes") # write 5 bytes
```
This allows us to read / write memory at arbitrary addresses without
instantiating a new `Fiddle::Pointer` object.
Examples where this API would be useful
[1](https://github.com/tenderlove/tenderjit/blob/f03481d28bff4d248746e596929b0841de65f181/lib/tenderjit/fiddle_hacks.rb#L26-L28)
[2](https://github.com/tenderlove/ruby/blob/77c8daa2d40dd58eeb3785ce17dea2ee38f308d1/lib/ruby_vm/rjit/c_pointer.rb#L193)
[3](https://github.com/tenderlove/ruby/blob/77c8daa2d40dd58eeb3785ce17dea2ee38f308d1/lib/ruby_vm/rjit/c_pointer.rb#L284)
I also added a writer method for the same reasons as the reader.
---------
https://github.com/ruby/fiddle/commit/04238cefed
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7988
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7988
|
|
|
|
the value is always nil
(https://github.com/ruby/irb/pull/617)
https://github.com/ruby/irb/commit/62691384f8
|
|
test
(https://github.com/ruby/irb/pull/614)
https://github.com/ruby/irb/commit/e68c6128aa
|
|
https://github.com/ruby/yarp/commit/08f08a6cc4
|
|
|
|
|
|
In relative referece, host part can be ommitted but can not be empty.
https://github.com/ruby/uri/commit/2980f0ba02
|
|
check_code_block(rename to check_code_syntax)
(https://github.com/ruby/irb/pull/611)
https://github.com/ruby/irb/commit/b7f4bfaaa4
|
|
string
(https://github.com/ruby/irb/pull/610)
https://github.com/ruby/irb/commit/f01ff0811b
|
|
Fixes [Bug #19569]
Notes:
Merged: https://github.com/ruby/ruby/pull/7967
|
|
Full path name of the source directory is a useless noise as tests.
https://github.com/ruby/yarp/commit/44a7ae2e64
|
|
This test fails on Solaris SPARC with the following error and I can't
figure out why:
TestGCCompact#test_moving_hashes_down_size_pools
Expected 499 to be >= 500.
|
|
(https://github.com/ruby/timeout/pull/30)
throw/catch is used for non-local control flow, not for exceptional situations.
For exceptional situations, raise should be used instead. A timeout is an
exceptional situation, so it should use raise, not throw/catch.
Timeout's implementation that uses throw/catch internally causes serious problems.
Consider the following code:
```ruby
def handle_exceptions
yield
rescue Exception => exc
handle_error # e.g. ROLLBACK for databases
raise
ensure
handle_exit unless exc # e.g. COMMIT for databases
end
Timeout.timeout(1) do
handle_exceptions do
do_something
end
end
```
This kind of design ensures that all exceptions are handled as errors, and
ensures that all exits (normal exit, early return, throw/catch) are not
handled as errors. With Timeout's throw/catch implementation, this type of
code does not work, since a timeout triggers the normal exit path.
See https://github.com/rails/rails/pull/29333 for an example of the damage
Timeout's design has caused the Rails ecosystem.
This switches Timeout.timeout to use raise/rescue internally. It adds a
Timeout::ExitException subclass of exception for the internal raise/rescue,
which Timeout.timeout will convert to Timeout::Error for backwards
compatibility. Timeout::Error remains a subclass of RuntimeError.
This is how timeout used to work in Ruby 2.0. It was changed in Ruby 2.1,
after discussion in [Bug #8730] (commit
https://github.com/ruby/timeout/commit/238c003c921e in the timeout repository). I
think the change from using raise/rescue to using throw/catch has caused
significant harm to the Ruby ecosystem at large, and reverting it is
the most sensible choice.
From the translation of [Bug #8730], it appears the issue was that
someone could rescue Exception and not reraise the exception, causing
timeout errors to be swallowed. However, such code is broken anyway.
Using throw/catch causes far worse problems, because then it becomes
impossible to differentiate between normal control flow and exceptional
control flow.
Also related to this is [Bug #11344], which changed how
Thread.handle_interrupt interacted with Timeout.
https://github.com/ruby/timeout/commit/f16545abe6
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
private
Fixes [Bug #19479]
https://github.com/ruby/ipaddr/commit/7faa0768d3
|
|
https://github.com/ruby/yarp/commit/89a00203af803032383338c943836da6bafca7d9
|
|
https://github.com/ruby/yarp/commit/4560cab235
|
|
|
|
|
|
https://github.com/rubygems/rubygems/commit/140405cee6
|
|
https://github.com/rubygems/rubygems/commit/0d10063824
|