Age | Commit message (Collapse) | Author |
|
|
|
|
|
This was an optimization for versions prior to 1.9 that traverse the
AST at runtime.
|
|
If $HOME isn't a valid directory, these specs fail, but I think it
is better to skip in this case, as it does not indicate a bug.
This fixes specs when run in the OpenBSD port, which sets $HOME
to an invalid directory to ensure that software's build system
is not accidentally relying on it.
|
|
* https://github.com/ruby/net-ftp/pull/34
* https://github.com/ruby/net-ftp/issues/36
|
|
[Bug #20573]
Followup: https://github.com/ruby/ruby/pull/10960
I believe `Kernel#warn` should behave in the same way than internal
`rb_warning_* APIs
|
|
`SPEC_TEMP_DIR` is not present until `tmp()` method is called
on parallel run. In this case `tmp()` is called with `File.umask = 0`.
This patch makes `SPEC_TEMP_DIR` before `File.umask = 0`.
To solve the issue essentially, I think `SPEC_TEMP_DIR` should be
prepared at the beginning of parallel process.
|
|
|
|
|
|
```
1)
TracePoint#inspect returns a String showing the event, method, path and line for a :call event FAILED
Expected "#<TracePoint:call 'call' /tmp/ruby/src/trunk/spec/ruby/core/objectspace/define_finalizer_spec.rb:33>" =~ /\A#<TracePoint:call [`']trace_point_spec_test_call' \/tmp\/ruby\/src\/trunk\/spec\/ruby\/core\/tracepoint\/inspect_spec.rb:43>\z/
to be truthy but was nil
```
This kind of failures comes because of finaizers.
So check the current file or not.
|
|
|
|
|
|
|
|
https://bugs.ruby-lang.org/issues/20478
|
|
|
|
They were initially made frozen to avoid false positives for cases such
as:
str = str.dup if str.frozen?
But this may cause bugs and is generally confusing for users.
[Feature #20205]
Co-authored-by: Jean Boussier <[email protected]>
|
|
|
|
|
|
[Bug #20421]
The bug was fixed in Ruby 3.3 via 9dcdffb8bf8a3654fd78bf1a58b30c8e13888a7a
|
|
For that particular spec, the empty lines' presence is not relevant.
So let's remove them to make the spec easier to maintain.
|
|
|
|
|
|
Signed-off-by: careworry <[email protected]>
|
|
[Feature #18576]
Since outright renaming `ASCII-8BIT` is deemed to backward incompatible,
the next best thing would be to only change its `#inspect`, particularly
in exception messages.
|
|
* Improve consistency of `Fiber.current.raise`.
|
|
|
|
Accecpt the same arguments as `caller` and `caller_locations`.
|
|
The backtick method recieves a frozen string unless it is interpolated.
Otherwise the string held in the ISeq could be mutated by a custom
backtick method.
|
|
|
|
This is a global variable and may happen to be set to 4 elsewhere.
http://ci.rvm.jp/logfiles/brlog.trunk.20240403-054356#L1707
```
The if expression with a boolean range ('flip-flop' operator) warns when Integer literals are used instead of predicates FAILED
Expected [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] == []
to be truthy but was false
```
|
|
|
|
|
|
Signed-off-by: crazeteam <[email protected]>
|
|
|
|
|
|
[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 <[email protected]>
|
|
Followup: https://github.com/ruby/ruby/pull/10017
[Feature #13557]
|
|
|
|
|
|
|
|
[Feature #13557]
Setting the backtrace with an array of strings is lossy. The resulting
exception will return nil on `#backtrace_locations`.
By accepting an array of `Backtrace::Location` instance, we can rebuild
a `Backtrace` instance and have a fully functioning Exception.
Co-Authored-By: Étienne Barrié <[email protected]>
|
|
[Bug #20188]
Ref: https://github.com/fxn/zeitwerk/issues/281#issuecomment-1893228355
Previously, it would only return the real constant location once the
autoload was fully completed.
|
|
|
|
|
|
irb will load multiple rc files now. If developer have their rcfile on
home directory or etc, equal assertion will fail with custom prompt.
|
|
Signed-off-by: cui fliter <[email protected]>
|
|
The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be
a null pointer, but this currently causes a segmentation fault when
trying to autoload the encoding. This commit fixes the issue by checking
for NULL before calling `rb_enc_autoload`.
|
|
|
|
|
|
Fixes [Bug #5179]
|