Age | Commit message (Collapse) | Author |
|
|
|
gc_is_moveable_obj is only given GC managed objects, and T_NIL cannot be
a GC managed type.
|
|
|
|
if a method `foo` uses a block, other (unrelated) method `foo`
can receives a block. So try to relax the unused block warning
condition.
```ruby
class C0
def f = yield
end
class C1 < C0
def f = nil
end
[C0, C1].f{ block } # do not warn
```
|
|
* Improve consistency of `Fiber.current.raise`.
|
|
https://blade.ruby-lang.org/ruby-dev/39325
|
|
[Feature #20347]
|
|
|
|
|
|
Accecpt the same arguments as `caller` and `caller_locations`.
|
|
|
|
This test fail relatively frequently and it's unclear what is
happening.
```
str: {"address":"0x7fbdeb26d4e0", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}}
bar: {"address":"0x7fbdd0a8b138", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true}}
```
The `"bar".freeze` literal correctly put an old-gen fstring on the stack.
But `-%w(b a r).join('')` returns a young-gen fstring, which suggest it
somehow failed to find the old one in the `frozen_strings` table.
This could be caused by another test corrupting the table, or corrupting
the `"bar"` fstring.
By using a different literal value we can learn whether the bug is specific
to `"bar"` (used in many tests) or more general.
|
|
Followup: https://github.com/ruby/ruby/pull/10532
|
|
```ruby
b = RubyVM::InstructionSequence.compile('def f = yield; def g = nil').to_a
pp b
#=>
...
{:use_block=>true},
...
```
|
|
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.173.0 to 1.174.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](https://github.com/ruby/setup-ruby/compare/5f19ec79cedfadb78ab837f95b87734d0003c899...6bd3d993c602f6b675728ebaecb2b569ff86e99b)
---
updated-dependencies:
- dependency-name: ruby/setup-ruby
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
reads
(https://github.com/ruby/stringio/pull/95)
[[Bug #20418]](https://bugs.ruby-lang.org/issues/20418)
Ruby IO#read preserves the encoding on partial read, but change it when
reading the whole IO
from commit https://github.com/ruby/ruby/commit/0ca7036682da:
> * io.c (read_all): should associate default external encoding.
> * io.c (io_read): should NOT associate default external encoding.
https://github.com/ruby/stringio/commit/073172da31
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
|
|
https://github.com/ruby/prism/commit/f9a1abbc64
|
|
All GC managed symbols are dynamic symbols so we don't need to check it.
|
|
We should always have a thread when we sweep so we don't need to check
that it exists.
|
|
Previously it would bypass the `FL_ABLE` check, but
since shapes introduction, it started having a different
behavior than `OBJ_FREEZE`, as it would onyl set the `FL_FREEZE`
flag, but not update the shape.
I have no indication of this causing a bug yet, but it seems
like a trap waiting to happen.
|
|
|
|
|
|
https://github.com/ruby/prism/commit/259aef2acd
|
|
(https://github.com/ruby/reline/pull/651)
https://github.com/ruby/reline/commit/90e43e01d4
|
|
https://github.com/ruby/prism/commit/4828e73263
|
|
|
|
(https://github.com/ruby/reline/pull/682)
https://github.com/ruby/reline/commit/17d12cc511
|
|
(https://github.com/ruby/reline/pull/681)
https://github.com/ruby/reline/commit/501b9a6c5f
|
|
## The problem
Currently the tests are executed in the fixed name directory "tmp"
under the top source directory. However it makes the tests fail when
the source path contains symlinks. Or unable to even start if the top
source directory is read-only, e.g., remote-mounting in read-only mode
from virtual machines.
Also, with the fixed directory, there is no way to avoid `pend` in
`TestGemPackage#test_extract_symlink_parent_doesnt_delete_user_dir`.
## The fix
Instead of creating the fixed name directory, this PR allows to use a
different path given with the environment variable "GEM_TEST_TMPDIR".
The default path is, as well as the current behavior, "tmp" from the
top source directory.
### Caveat
It is the caller's responsibility to make the directory safe (owned,
world unwritable, or sticky) when setting the environment variable.
https://github.com/rubygems/rubygems/commit/bf00850656
|
|
|
|
Colons are special in Makefiles.
|
|
File.birthtime has existed since Ruby 2.2, and pathname requires Ruby
>= 2.7.0, so the method will always be there.
https://github.com/ruby/pathname/commit/aca9613bbf
|
|
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.10 to 3.25.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/4355270be187e1b672a7a1c7c7bae5afdc1ab94a...df5a14dc28094dc936e103b37d749c6628682b60)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.91 to 0.9.94.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.91...v0.9.94)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
https://github.com/rubygems/rubygems/commit/04cf565ebe
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.91 to 0.9.94.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.91...v0.9.94)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
https://github.com/rubygems/rubygems/commit/ac952f030b
|
|
|
|
|
|
Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
|
|
|
|
|
|
Because Kernel#autoload? uses the current namespace, it can lead to
potentially confusing results. We should make it clearer that modules
count as separate namespaces to lookup in.
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
|
|
|
|
This makes it easier to notice a dependency is causing interpreter or
JIT deoptimization.
```ruby
Warning[:performance] = true
class String
def freeze
super
end
end
```
```
./test.rb:4: warning: Redefining 'String#freeze' disable multiple interpreter and JIT optimizations
```
|
|
Same idea as the x64 equivalent in c2622b52536c5, removing the register
shuffle coming from the pop two, push one stack motion these VM
instructions perform.
```
# Insn: 0004 opt_or (stack_size: 2)
- orr x11, x1, x9
- mov x1, x11
+ orr x1, x1, x9
```
|
|
(https://github.com/ruby/reline/pull/680)
https://github.com/ruby/reline/commit/84762fc588
|
|
(https://github.com/ruby/reline/pull/679)
https://github.com/ruby/reline/commit/9e93ad52e7
|
|
|
|
This patch is part of universal parser work.
## Summary
- Decouple VALUE from members below:
- `(struct parser_params *)->debug_lines`
- `(rb_ast_t *)->body.script_lines`
- Instead, they are now `rb_parser_ary_t *`
- They can also be a `(VALUE)FIXNUM` as before to hold line count
- `ISEQ_BODY(iseq)->variable.script_lines` remains VALUE
- In order to do this,
- Add `VALUE script_lines` param to `rb_iseq_new_with_opt()`
- Introduce `rb_parser_build_script_lines_from()` to convert `rb_parser_ary_t *` into `VALUE`
## Other details
- Extend `rb_parser_ary_t *`. It previously could only store `rb_parser_ast_token *`, now can store script_lines, too
- Change tactics of building the top-level `SCRIPT_LINES__` in `yycompile0()`
- Before: While parsing, each line of the script is added to `SCRIPT_LINES__[path]`
- After: After `yyparse(p)`, `SCRIPT_LINES__[path]` will be built from `p->debug_lines`
- Remove the second parameter of `rb_parser_set_script_lines()` to make it simple
- Introduce `script_lines_free()` to be called from `rb_ast_free()` because the GC no longer takes care of the script_lines
- Introduce `rb_parser_string_deep_copy()` in parse.y to maintain script_lines when `rb_ruby_parser_free()` called
- With regard to this, please see *Future tasks* below
## Future tasks
- Decouple IMEMO from `rb_ast_t *`
- This lifts the five-members-restriction of Ruby object,
- So we will be able to move the ownership of the `lex.string_buffer` from parser to AST
- Then we remove `rb_parser_string_deep_copy()` to make the whole thing simple
|