aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Warn `it` (#9152)Takashi Kokubun2023-12-073-0/+21
| | | https://bugs.ruby-lang.org/issues/18980
* [ruby/open-uri] Set default for max_redirects and add exception classAndrew Kane2023-12-072-3/+6
| | | | https://github.com/ruby/open-uri/commit/dcdcb885cc
* [ruby/open-uri] Add :max_redirects optionAndrew Kane2023-12-072-0/+22
| | | | https://github.com/ruby/open-uri/commit/7fd5ea09a7
* [rubygems/rubygems] Make --build-root disable auto-user-install.Ellen Marie Dash2023-12-072-8/+30
| | | | https://github.com/rubygems/rubygems/commit/6a06b0763f
* [rubygems/rubygems] Better approach to falling back to user installation ↵David Rodríguez2023-12-076-128/+29
| | | | | | when GEM_HOME not writable https://github.com/rubygems/rubygems/commit/f67bced16b
* [rubygems/rubygems] Add some early assertions to make sure the test is ↵David Rodríguez2023-12-071-0/+3
| | | | | | | | | progressing fine If an error happens during the install command, it will fail in an strange way right now. https://github.com/rubygems/rubygems/commit/2b6e0c703a
* [rubygems/rubygems] Use globals variables for standard input/outputVít Ondruch2023-12-072-4/+23
| | | | | | | | | | | Replace use of `STDIN`, `STDOUT` and `STDERR` constants by their `$stdin`, `$stdout` and `$stderr` global variable equivalents. This enables easier testing via standard means, such as `assert_output` for minitest or `expect { print 'foo' }.to output.to_stdout` for RSpec test suites. https://github.com/rubygems/rubygems/commit/a0a6fc1b76
* Copy encoding flags when copying a regex [Bug #20039]Dustin Brown2023-12-062-0/+12
| | | | | | | | | | | | | * :bug: Fixes [Bug #20039](https://bugs.ruby-lang.org/issues/20039) When a Regexp is initialized with another Regexp, we simply copy the properties from the original. However, the flags on the original were not being copied correctly. This caused an issue when the original had multibyte characters and was being compared with an ASCII string. Without the forced encoding flag (`KCODE_FIXED`) transferred on to the new Regexp, the comparison would fail. See the included test for an example. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Remove a note for `bundle exec ruby` not printing a warningYusuke Endoh2023-12-071-1/+0
| | | | The implementation limitation is fixed by https://github.com/rubygems/rubygems/pull/7224
* Move replace_require into bundled_gems.rbHiroshi SHIBATA2023-12-072-20/+20
|
* Fix SEGV caused by `GC::Profiler.raw_data` (#9122)Soutaro Matsumoto2023-12-072-1/+9
|
* Add NEWS for Range#overlap?hogelog2023-12-071-0/+2
|
* [ruby/prism] Emit error for constant assignments in defsHaldun Bayhantopcu2023-12-064-0/+12
| | | | https://github.com/ruby/prism/commit/864b06f90e
* YJIT: Add some object validity assertionsAlan Wu2023-12-062-2/+9
| | | | | | We've seen quite a few compaction bugs lately, and these assertions should give clearer symptoms. We only call class_of() on objects that the Ruby code can see.
* [ruby/prism] Simplify unterminated stringKevin Newton2023-12-062-4/+4
| | | | https://github.com/ruby/prism/commit/ef512ca914
* [PRISM] Correct depth offset for block local varsMatt Valentine-House2023-12-062-0/+27
| | | | | | | Blocks should always look at their own local table first, even when defined inside an ensure/rescue or something else that uses depth offset. We can ignore the depth offset if we're doing local lookups inside a block
* [ruby/prism] Move flag position consistently to frontKevin Newton2023-12-06660-25544/+25533
| | | | https://github.com/ruby/prism/commit/6e69a81737
* [ruby/prism] Fix closing loc for string literalsTSUYUSATO Kitsune2023-12-062-5/+17
| | | | | | Fix https://github.com/ruby/prism/pull/1974 https://github.com/ruby/prism/commit/453d403593
* [ruby/prism] Fix one potential memory leak and silence one false positive ↵Haldun Bayhantopcu2023-12-061-0/+3
| | | | | | report. https://github.com/ruby/prism/commit/9608aa386e
* YJIT: Avoid register allocation conflict with a higher stack_idx (#9143)Takashi Kokubun2023-12-062-5/+34
| | | | | YJIT: Avoid register allocation conflict with a higher stack_idx
* [rubygems/rubygems] Bundler::Fetcher uses Bundler::CIDetectorEric Mueller2023-12-062-20/+10
| | | | | | | | | | 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
* [rubygems/rubygems] Duplicate Gem::CIDetector into bundlerEric Mueller2023-12-063-0/+97
| | | | | | | | | | | 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
* [rubygems/rubygems] Gem::UpdateSuggestion uses Gem::CIDetectorEric Mueller2023-12-062-15/+2
| | | | https://github.com/rubygems/rubygems/commit/e5b0458342
* [rubygems/rubygems] Introduce the Gem::CIDetectorEric Mueller2023-12-063-0/+120
| | | | | | | | | | | | | | | | | | | | | | 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
* [ruby/prism] Update documentation for encodingsKevin Newton2023-12-062-3/+3
| | | | https://github.com/ruby/prism/commit/18e6df0d4f
* [prism] Handle string and xstring encodingsKevin Newton2023-12-061-9/+32
|
* [ruby/prism] Provide flags for changing encodingsKevin Newton2023-12-0631-226/+455
| | | | https://github.com/ruby/prism/commit/e838eaff6f
* [PRISM] Extract a PM_NOP helperJemma Issroff2023-12-061-5/+8
|
* [PRISM] Fix ReturnNodesJemma Issroff2023-12-062-10/+58
| | | | | This code is almost exactly the same (fixed variable names) as what exists already in compile.c
* Re-embed when removing Object instance variablesPeter Zhu2023-12-066-6/+55
| | | | | | | | | | | 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.
* [PRISM] Account for nil parent in Call{Operator,And,Or}PathWriteNodesJemma Issroff2023-12-062-3/+21
| | | | | | | 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
* [ruby/bigdecimal] Clarify that JSON methods come from the JSON gemPeter Zhu2023-12-061-1/+1
| | | | https://github.com/ruby/bigdecimal/commit/581725d4e5
* Deduplicate assertions in redblack_balancePeter Zhu2023-12-061-40/+10
| | | | | The bug in i686 was fixed in commit 71babe5536bdb2238509752d8706194ee57ff485.
* [ruby/bigdecimal] [DOC] Add section Methods for Working with JSONBurdetteLamar2023-12-061-1/+14
| | | | https://github.com/ruby/bigdecimal/commit/2edd8d0a23
* [ruby/prism] Add locals_body_index to DefNode, BlockNode, LambdaNodeJemma Issroff2023-12-06291-3/+873
| | | | | | | | 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
* [PRISM] Implement `PM_MATCH_PREDICATE_NODE` for `defined?`eileencodes2023-12-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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 ```
* [PRISM] Implement `PM_KEYWORD_HASH_NODE` for `defined?`eileencodes2023-12-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* [PRISM] Implement `PM_SPLAT_NODE` for `defined?`eileencodes2023-12-062-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* [PRISM] Implement `PM_SOURCE_LINE_NODE` for `defined?`eileencodes2023-12-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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 ```
* [PRISM] Implement `PM_SOURCE_FILE_NODE` for `defined?`eileencodes2023-12-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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 ```
* [PRISM] Implement `PM_SOURCE_ENCODING_NODE` for `defined?eileencodes2023-12-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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 ```
* [PRISM] Implement `PM_IMAGINARY_NODE` for `defined?`eileencodes2023-12-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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 ```
* [PRISM] Compile Rescue Modifier nodesMatt Valentine-House2023-12-062-2/+59
|
* [ruby/prism] Update snapshotHaldun Bayhantopcu2023-12-061-0/+1
| | | | https://github.com/ruby/prism/commit/5f0ea09785
* Add NEWS entry about Encoding#replicateBenoit Daloze2023-12-061-0/+5
|
* [DOC] Fixed document positionNobuyoshi Nakada2023-12-061-11/+11
| | | | | | Method documentation must be placed immediately before each implementation, without any other functions or preprocessor directives.
* [rubygems/rubygems] Try to load Gem::BUNDLED_GEMS on BundlerHiroshi SHIBATA2023-12-061-0/+5
| | | | | | | `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
* [ruby/rdoc] Only word-ending colon separates new definitionNobuyoshi Nakada2023-12-062-3/+9
| | | | | | | 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
* [ruby/rdoc] Needs more backslash to match escaping backslashsNobuyoshi Nakada2023-12-061-2/+1
| | | | https://github.com/ruby/rdoc/commit/1904e9076d
* [ruby/rdoc] Use single quotes to keep backslash literallyNobuyoshi Nakada2023-12-061-1/+1
| | | | https://github.com/ruby/rdoc/commit/4ac9be7f48