Age | Commit message (Collapse) | Author |
|
[Feature #20205]
As a path toward enabling frozen string literals by default in the future,
this commit introduce "chilled strings". From a user perspective chilled
strings pretend to be frozen, but on the first attempt to mutate them,
they lose their frozen status and emit a warning rather than to raise a
`FrozenError`.
Implementation wise, `rb_compile_option_struct.frozen_string_literal` is
no longer a boolean but a tri-state of `enabled/disabled/unset`.
When code is compiled with frozen string literals neither explictly enabled
or disabled, string literals are compiled with a new `putchilledstring`
instruction. This instruction is identical to `putstring` except it marks
the String with the `STR_CHILLED (FL_USER3)` and `FL_FREEZE` flags.
Chilled strings have the `FL_FREEZE` flag as to minimize the need to check
for chilled strings across the codebase, and to improve compatibility with
C extensions.
Notes:
- `String#freeze`: clears the chilled flag.
- `String#-@`: acts as if the string was mutable.
- `String#+@`: acts as if the string was mutable.
- `String#clone`: copies the chilled flag.
Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously, Kernel#lambda returned a non-lambda proc when given a
non-literal block and issued a warning under the `:deprecated` category.
With this change, Kernel#lambda will always return a lambda proc, if it
returns without raising.
Due to interactions with block passing optimizations, we previously had
two separate code paths for detecting whether Kernel#lambda got a
literal block. This change allows us to remove one path, the hack done
with rb_control_frame_t::block_code introduced in 85a337f for supporting
situations where Kernel#lambda returned a non-lambda proc.
[Feature #19777]
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/8405
|
|
|
|
Deprecate Kernel#open and IO support for subprocess creation and
forking. This deprecates subprocess creation and forking in
- Kernel#open
- URI.open
- IO.binread
- IO.foreach
- IO.readlines
- IO.read
- IO.write
This behavior is slated to be removed in Ruby 4.0
[Feature #19630]
Notes:
Merged: https://github.com/ruby/ruby/pull/7915
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8127
|
|
[Feature #19755]
Before (in /tmp/test.rb):
```ruby
Object.class_eval("p __FILE__") # => "(eval)"
```
After:
```ruby
Object.class_eval("p __FILE__") # => "(eval at /tmp/test.rb:1)"
```
This makes it much easier to track down generated code in case
the author forgot to provide a filename argument.
Notes:
Merged: https://github.com/ruby/ruby/pull/8070
|
|
|
|
|
|
|
|
|
|
|
|
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
|
|
[Bug #19415]
If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.
So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
Notes:
Merged: https://github.com/ruby/ruby/pull/7257
|
|
This reverts commit fa49651e05a06512e18ccb2f54a7198c9ff579de.
Notes:
Merged: https://github.com/ruby/ruby/pull/7256
|
|
[Bug #19415]
If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.
So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
Notes:
Merged: https://github.com/ruby/ruby/pull/7252
|
|
|
|
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6258
|
|
Fixes [Bug #18826]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/6018
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
|
|
|
|
WASI doesn't provide a way to spawn a new process
Notes:
Merged: https://github.com/ruby/ruby/pull/5672
|
|
cap-std, an underlying sandbox implementation of WASI in wasmtime, doesn't
allow to create a symlink to an absolute path to enforce sandbox restriction.
See also: https://github.com/bytecodealliance/cap-std/commit/257867a1d3a589b2561b00111ffa4db3bab0e8be
Notes:
Merged: https://github.com/ruby/ruby/pull/5656
|
|
|
|
|
|
Has been deprecated since ebff9dc10e6e72239c23e50acc7d3cbfdc659e7a.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5281
|
|
Actually used methods are all instance method, not the singleton
method.
Notes:
Merged: https://github.com/ruby/ruby/pull/5281
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5281
|
|
`to_s` has the explict specification while `inspect` is often
vague.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|