../prism_compile.c: In function ‘pm_compile_node’:
../compile.c:583:24: warning: ‘retry_end_l’ may be used uninitialized in this function [-Wmaybe-uninitialized]
583 | anchor->last->next = elem;
| ~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from ../compile.c:14256:
../prism_compile.c:5796:16: note: ‘retry_end_l’ was declared here
5796 | LABEL *retry_end_l;
| ^~~~~~~~~~~
../compile.c:255:42: warning: ‘retry_label’ may be used uninitialized in this function [-Wmaybe-uninitialized]
255 | #define LABEL_REF(label) ((label)->refcnt++)
| ^~
In file included from ../compile.c:14256:
../prism_compile.c:5795:16: note: ‘retry_label’ was declared here
5795 | LABEL *retry_label;
| ^~~~~~~~~~~
../prism_compile.c:5919:52: warning: ‘previous_block’ may be used uninitialized in this function [-Wmaybe-uninitialized]
5919 | ISEQ_COMPILE_DATA(iseq)->current_block = previous_block;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
This is best understood by looking at the change to the output:
```diff
# Insn: 0002 opt_and (stack_size: 2)
- mov rax, rsi
- and rax, rdi
- mov rsi, rax
+ and rsi, rdi
```
It's a bit awkward to match against due to how stack operands are
lowered, but hey, it's nice to save the 2 unnecessary MOVs.
The `rb_fstring(rb_enc_str_new())` pattern is inefficient because:
- It passes a mutable string to `rb_fstring` so if it has to be interned it will first be duped.
- It an equivalent interned string already exists, we allocated the string for nothing.
With `rb_enc_interned_str` we either directly get the pre-existing string with 0 allocations,
or efficiently directly intern the one we create without first duping it.
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.
The `rb_fstring(rb_enc_str_new())` pattern is inneficient because:
- It passes a mutable string to `rb_fstring` so if it has to be interned
it will first be duped.
- It an equivalent interned string already exists, we allocated the string
for nothing.
With `rb_enc_interned_str` we either directly get the pre-existing string
with 0 allocations, or efficiently directly intern the one we create
without first duping it.
and declare it will be removed soon.
ddtrace is still referes the API and build was failed.
See https://github.com/DataDog/dd-trace-rb/pull/3578
Maybe threre are only few users of this C-API now so we can remove
it soon.
turbo_tests 2.1.1 adds json to its dependency and the current bundler
does not take the standard library json and fails to build as a gem
before the installation.
(https://github.com/ruby/irb/pull/824)
* Command is not a method
* Fix command test
* Implement non-method command name completion
* Add test for ExtendCommandBundle.def_extend_command
* Add helper method install test
* Remove spaces in command input parse
* Remove command arg unquote in help command
* Simplify Statement and handle execution in IRB::Irb
* Tweak require, const name
* Always install CommandBundle module to main object
* Remove considering local variable in command or expression check
* Remove unused method, tweak
* Remove outdated comment for help command arg
Co-authored-by: Stan Lo <stan001212@gmail.com>
---------
8fb776e379
Co-authored-by: Stan Lo <stan001212@gmail.com>
Previously, `make test-knownbugs` crashed with `NoMethodError` due to
the failed regex match if there is a test case in KNOWNBUGS.rb.
The note about 1.8 compatibility is probably bogus as we require a way
more recent BASERUBY now.