summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-06[ruby/prism] Move flag position consistently to frontKevin Newton
https://github.com/ruby/prism/commit/6e69a81737
2023-12-06[ruby/prism] Fix closing loc for string literalsTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1974 https://github.com/ruby/prism/commit/453d403593
2023-12-06[ruby/prism] Fix one potential memory leak and silence one false positive ↵Haldun Bayhantopcu
report. https://github.com/ruby/prism/commit/9608aa386e
2023-12-06YJIT: Avoid register allocation conflict with a higher stack_idx (#9143)Takashi Kokubun
YJIT: Avoid register allocation conflict with a higher stack_idx
2023-12-06[rubygems/rubygems] Bundler::Fetcher uses Bundler::CIDetectorEric Mueller
Additionally, the result is memoized, as it's used twice in a row. This change does result in a net behavioral diff, as the list of ENVs being checked has been updated (now includes buildkite, taskcluster, cirrus, dsari, and drops buildbox and snap) https://github.com/rubygems/rubygems/commit/3fb445a5a1
2023-12-06[rubygems/rubygems] Duplicate Gem::CIDetector into bundlerEric Mueller
Because bundler needs to support older versions of rubygems, we can't actually rely on Gem::CIDetector (yet - in a year or so they might be able to consolidate, if they don't change futher). So we're copying it into the Bundler:: namespace, and enforcing that they stay completely in sync with a test. No other tests are needed, since Gem::CIDetector is already tested, and this is and will remain identical. https://github.com/rubygems/rubygems/commit/abc67f0da1
2023-12-06[rubygems/rubygems] Gem::UpdateSuggestion uses Gem::CIDetectorEric Mueller
https://github.com/rubygems/rubygems/commit/e5b0458342
2023-12-06[rubygems/rubygems] Introduce the Gem::CIDetectorEric Mueller
This is based on the list in Gem::UpdateSuggestion and Bundler::Fetcher; these have similar purposes (determining whether/what CI we're executing in), and can benefit from being combined and updated (they're both slightly out of date). Noteable changes: * We'll consider ourselves to be on a CI in more cases - if CI_NAME or TASKCLUSTER_ROOT_URL are set specifically, since those represent two cases that were either overlooked or are no longer covered by the existing implementation. (Or possibly TaskCluster still does provide RUN_ID, but failed to document it) * We will notice/track a few additional services in ci_strings (cirrus, dsari, taskcluster), stop tracking 'snap' (they went under in 2017), and update buildbox to buildkite (they've been called that for 8 years, and the BUILDBOX envs have been deprecated for 3). * We'll also sort/uniq/downcase the values (all of which only matter because of the special case of CI_NAME). https://github.com/rubygems/rubygems/commit/60652b942f
2023-12-06[ruby/prism] Update documentation for encodingsKevin Newton
https://github.com/ruby/prism/commit/18e6df0d4f
2023-12-06[prism] Handle string and xstring encodingsKevin Newton
2023-12-06[ruby/prism] Provide flags for changing encodingsKevin Newton
https://github.com/ruby/prism/commit/e838eaff6f
2023-12-06[PRISM] Extract a PM_NOP helperJemma Issroff
2023-12-06[PRISM] Fix ReturnNodesJemma Issroff
This code is almost exactly the same (fixed variable names) as what exists already in compile.c
2023-12-06Re-embed when removing Object instance variablesPeter Zhu
Objects with the same shape must always have the same "embeddedness" (either embedded or heap allocated) because YJIT assumes so. However, using remove_instance_variable, it's possible that some objects are embedded and some are heap allocated because it does not re-embed heap allocated objects. This commit changes remove_instance_variable to re-embed Object instance variables when it becomes small enough.
2023-12-06[PRISM] Account for nil parent in Call{Operator,And,Or}PathWriteNodesJemma Issroff
Prior to this commit, we were not accounting for the case of a nil parent in a CallXPathWriteNode, for example ::A ||= 1. This commit checks if the parent exists, and if not, uses Object as the inferred parent
2023-12-06[ruby/bigdecimal] Clarify that JSON methods come from the JSON gemPeter Zhu
https://github.com/ruby/bigdecimal/commit/581725d4e5
2023-12-06Deduplicate assertions in redblack_balancePeter Zhu
The bug in i686 was fixed in commit 71babe5536bdb2238509752d8706194ee57ff485.
2023-12-06[ruby/bigdecimal] [DOC] Add section Methods for Working with JSONBurdetteLamar
https://github.com/ruby/bigdecimal/commit/2edd8d0a23
2023-12-06[ruby/prism] Add locals_body_index to DefNode, BlockNode, LambdaNodeJemma Issroff
The locals_body_index gives the index in the locals array where the locals from the body start. This allows compilers to easily index past the parameters in the locals array. https://github.com/ruby/prism/commit/5d4627b890
2023-12-06[PRISM] Implement `PM_MATCH_PREDICATE_NODE` for `defined?`eileencodes
Ruby code: ```ruby defined? 1 in 1 ``` Instructions: ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave ```
2023-12-06[PRISM] Implement `PM_KEYWORD_HASH_NODE` for `defined?`eileencodes
Ruby code: ```ruby defined? [a: [:b, :c]] ``` Instructions (without optimizations): ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0001 ed: 0007 sp: 0000 cont: 0009 | == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject true 0003 branchunless 9 0005 putobject "expression" 0007 swap 0008 pop 0009 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0000 ed: 0009 sp: 0000 cont: 0009 | == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject true 0003 branchunless 9 0005 putobject "expression" 0007 swap 0008 pop 0009 leave ``` Instructions (with optimizations): ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0001 ed: 0003 sp: 0000 cont: 0005 | == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject "expression" 0003 swap 0004 pop 0005 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0000 ed: 0005 sp: 0000 cont: 0005 | == disasm: #<ISeq:defined guard in <compiled>@<compiled>:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject "expression" 0003 swap 0004 pop 0005 leave ```
2023-12-06[PRISM] Implement `PM_SPLAT_NODE` for `defined?`eileencodes
In an array for `defined?` we need to check if there is a `contains_splat` flag, if so bail early. Ruby code: ```ruby defined?([[*1..2], 3, *4..5]) ``` Instructions: ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,29)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,29)> 0000 putobject "expression" 0002 leave ```
2023-12-06[PRISM] Implement `PM_SOURCE_LINE_NODE` for `defined?`eileencodes
Ruby code: ```ruby defined?(__LINE__) ``` Instructions: ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave ```
2023-12-06[PRISM] Implement `PM_SOURCE_FILE_NODE` for `defined?`eileencodes
Ruby code: ```ruby defined?(__FILE__) ``` Instructions: ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave ```
2023-12-06[PRISM] Implement `PM_SOURCE_ENCODING_NODE` for `defined?eileencodes
Ruby code: ```ruby defined?(__ENCODING__) ``` Instructions: ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,22)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,22)> 0000 putobject "expression" 0002 leave ```
2023-12-06[PRISM] Implement `PM_IMAGINARY_NODE` for `defined?`eileencodes
Ruby Code: ``` defined?(1i) ``` Instructions: ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)> 0000 putobject "expression" 0002 leave ```
2023-12-06[PRISM] Compile Rescue Modifier nodesMatt Valentine-House
2023-12-06[ruby/prism] Update snapshotHaldun Bayhantopcu
https://github.com/ruby/prism/commit/5f0ea09785
2023-12-06Add NEWS entry about Encoding#replicateBenoit Daloze
2023-12-06[DOC] Fixed document positionNobuyoshi Nakada
Method documentation must be placed immediately before each implementation, without any other functions or preprocessor directives.
2023-12-06[rubygems/rubygems] Try to load Gem::BUNDLED_GEMS on BundlerHiroshi SHIBATA
`bundle exec ruby foo.rb` ignore to load gem_prelude.rb. Because warnings feature is not working with `bundle exec ruby`. https://github.com/rubygems/rubygems/commit/a0d4ed92a7
2023-12-06[ruby/rdoc] Only word-ending colon separates new definitionNobuyoshi Nakada
When followed by non-space characters, rather it looks like a URL or a path name on Windows. https://github.com/ruby/rdoc/commit/72c6560773
2023-12-06[ruby/rdoc] Needs more backslash to match escaping backslashsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/1904e9076d
2023-12-06[ruby/rdoc] Use single quotes to keep backslash literallyNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/4ac9be7f48
2023-12-06Refine the NEWS entry for bundler warningYusuke Endoh
2023-12-06Fix incorrect "nested_fake_name" documentation. (#9135)Samuel Williams
2023-12-06Add news for `Fiber#kill`. (#9134)Samuel Williams
2023-12-06Fix RCLASS_EXT dump [ci skip]Nobuyoshi Nakada
2023-12-06Adjust styles [ci skip]Nobuyoshi Nakada
2023-12-06[rubygems/rubygems] test_bundled_ca.rb: Add Net::OpenTimeout as a offline case.Jun Aruga
It seems that when DNS connection is enabled, but the TCP connection is disabled in a way, the `Net::HTTP.connect` raises `Net::OpenTimeout`. And I want to skip the tests in this case. https://github.com/ruby/net-http/blob/042faf74e77d786ff60dff81555f6ec4f21e77a9/lib/net/http.rb#L1601-L1608 ``` 1) Error: TestBundledCA#test_accessing_new_index: Net::OpenTimeout: execution expired /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `initialize' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `open' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `block in connect' /builddir/build/BUILD/ruby-3.0.4/lib/timeout.rb:107:in `timeout' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:985:in `connect' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:970:in `do_start' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:959:in `start' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:1512:in `request' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:1270:in `get' /builddir/build/BUILD/ruby-3.0.4/test/rubygems/test_bundled_ca.rb:34:in `assert_https' /builddir/build/BUILD/ruby-3.0.4/test/rubygems/test_bundled_ca.rb:58:in `test_accessing_new_index' ... ``` https://github.com/rubygems/rubygems/commit/5defe0a2f6
2023-12-06[rubygems/rubygems] Use String#unpack1 available since ruby 3.0Martin Emde
https://github.com/rubygems/rubygems/commit/46258d6cb4
2023-12-06Revert "allow enabling Prism via flag or env var"HParker
This reverts commit 9b76c7fc89460ed8e9be40e4037c1d68395c0f6d.
2023-12-06Adjust styles [ci skip]Nobuyoshi Nakada
2023-12-06Don't warn generally for `IO::Buffer`, only on specific code paths e.g. ↵Samuel Williams
`map`. (#9131)
2023-12-05Fix parameter types for rb_ivar_foreach() callbacksAlan Wu
For this public API, the callback is declared to take `(ID, VALUE, st_data_t)`, but it so happens that using `(st_data_t, st_data_t, st_data_t)` also type checks, because the underlying type is identical. Use it as declared and get rid of some casts.
2023-12-05Fix alphabetical order of include in shape.cPeter Zhu
2023-12-05[rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in onlyMartin Emde
Looks for the CHECKSUMS section in the lockfile, activating the feature only if the section exists. Without a CHECKSUMS section, Bundler will continue as normal, validating checksums when gems are installed while checksums from the compact index are present. https://github.com/rubygems/rubygems/commit/2353cc93a4
2023-12-05[ruby/prism] Fix defined with new lineeileencodes
It's possible to write the following and have it be valid Ruby: ``` defined?("foo" ) ``` But Prism wasn't taking the new line into account. This adds an `accept1` for a `PM_TOKEN_NEWLINE` to account for this. I've also updated the fixtures and snapshots to test this. https://github.com/ruby/prism/commit/b87f8eedc6
2023-12-05[ruby/syntax_suggest] Change assertion to not rely on exact text from prismSchneems
The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like https://github.com/ruby/ruby/actions/runs/7104601478/job/19339940315. This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle. https://github.com/ruby/syntax_suggest/commit/4b6abb763e
2023-12-05YJIT: Assert code pages are not partially in-boundsAlan Wu
Helps understand page switching