summaryrefslogtreecommitdiff
path: root/defs
AgeCommit message (Collapse)Author
2025-07-14merge revision(s) b42afa1dbcbb91e89852b3b3bc72484d7f0a5528, ↵Takashi Kokubun
f1f0cc14cc7d3f9be35b203e5583f9224b1e2387, 543e3a1896ae2fe3b5b954f6497d261ab5663a15, ed2806117a0b76e4439ce1a061fae21d9e116d69, 46e4c8673747de96838d2c5dec37446d23d99d88: [Backport #21500] Suppress gcc 15 unterminated-string-initialization warnings Separate `__has_attribute` from `defined(__has_attribute)` Fix Visual C warnings: ``` regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline ``` Cast up `int` instruction code to `VALUE` Fix Visual C warnings: ``` iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size ``` Do not let files depend on a phony target Detect `clock_gettime` and `clock_getres` for winpthreads
2025-05-13merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, ↵Takashi Kokubun
b48b841378f80e16378ceb83f3b78e52df9ae023, 2fe8b9cd3d308d754f3d33a948dfb1dd782a10dc: [Backport #21327] Fix redefinition of `clock_gettime` and `clock_getres` winpthreads-git 12.0.0.r720 provides `clock_gettime` and `clock_getres` as inline functions. digest.so needs ruby/digest.h which is installed by build-ext Copy to path with the base name
2024-12-23Revert "[Bug #20965] Define `it` like an ordinary argument" (#12418)Takashi Kokubun
Revert "[Bug #20965] Define `it` like an ordinary argument (#12398)" Reverts ruby/ruby#12398 as per https://bugs.ruby-lang.org/issues/20970#note-6 and https://bugs.ruby-lang.org/issues/20965#note-7. We need more time to design the intended behavior, and it's too late for Ruby 3.4. Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2024-12-18[Bug #20965] Define `it` like an ordinary argument (#12398)Nobuyoshi Nakada
Also fixes [Bug #20955] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2024-12-12[Feature #20884] Reserve "Ruby" toplevel nameNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12315
2024-11-29Warn when redefining __id__ as well as object_idJohn Hawthorn
[Feature #20912] Notes: Merged: https://github.com/ruby/ruby/pull/12177
2024-11-26Optimize instructions when creating an array just to call `include?` (#12123)Randy Stauner
* Add opt_duparray_send insn to skip the allocation on `#include?` If the method isn't going to modify the array we don't need to copy it. This avoids the allocation / array copy for things like `[:a, :b].include?(x)`. This adds a BOP for include? and tracks redefinition for it on Array. Co-authored-by: Andrew Novoselac <andrew.novoselac@shopify.com> * YJIT: Implement opt_duparray_send include_p Co-authored-by: Andrew Novoselac <andrew.novoselac@shopify.com> * Update opt_newarray_send to support simple forms of include?(arg) Similar to opt_duparray_send but for non-static arrays. * YJIT: Implement opt_newarray_send include_p --------- Co-authored-by: Andrew Novoselac <andrew.novoselac@shopify.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2024-07-29Expand opt_newarray_send to support Array#pack with buffer keyword argRandy Stauner
Use an enum for the method arg instead of needing to add an id that doesn't map to an actual method name. $ ruby --dump=insns -e 'b = "x"; [v].pack("E*", buffer: b)' before: ``` == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,34)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] b@0 0000 putchilledstring "x" ( 1)[Li] 0002 setlocal_WC_0 b@0 0004 putself 0005 opt_send_without_block <calldata!mid:v, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0007 newarray 1 0009 putchilledstring "E*" 0011 getlocal_WC_0 b@0 0013 opt_send_without_block <calldata!mid:pack, argc:2, kw:[#<Symbol:0x000000000023110c>], KWARG> 0015 leave ``` after: ``` == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,34)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] b@0 0000 putchilledstring "x" ( 1)[Li] 0002 setlocal_WC_0 b@0 0004 putself 0005 opt_send_without_block <calldata!mid:v, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0007 putchilledstring "E*" 0009 getlocal b@0, 0 0012 opt_newarray_send 3, 5 0015 leave ``` Notes: Merged: https://github.com/ruby/ruby/pull/11249
2024-06-04Add/revise Errno descriptions (#10897)Burdette Lamar
2024-05-26Prevent test-bundled-gems outputs from mixingNobuyoshi Nakada
Run test-bundled-gems-run and test-bundled-gems-spec sequentially.
2024-05-23Introduce a specialize instruction for Array#packNobuyoshi Nakada
Instructions for this code: ```ruby # frozen_string_literal: true [a].pack("C") ``` Before this commit: ``` == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)> 0000 putself ( 3)[Li] 0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 newarray 1 0005 putobject "C" 0007 opt_send_without_block <calldata!mid:pack, argc:1, ARGS_SIMPLE> 0009 leave ``` After this commit: ``` == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)> 0000 putself ( 3)[Li] 0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 putobject "C" 0005 opt_newarray_send 2, :pack 0008 leave ``` Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2024-05-09Revert "Update revision.h if branch unmatch not only revision"Nobuyoshi Nakada
This reverts commit 5a332940ed2f809cb17af7e4d068089b6e1fa6ca. Something does not work well on Github Actions.
2024-05-08Update revision.h if branch unmatch not only revision [ci skip]Nobuyoshi Nakada
2024-04-19Fix rubyspec-capiext dependencyNobuyoshi Nakada
Not to build the rubyspec-capiext extension libraries again on the next build after the build all extensions get built, ensure these extensions are up to date when recursively building from exts.mk.
2024-04-16Escape colons in pre-commit dependency [ci skip]Nobuyoshi Nakada
Colons are special in Makefiles.
2024-03-10Clean intermediate files and debug info for each targetNobuyoshi Nakada
By replacing `ALLOBJS` suffix with intermediate file suffixes instead of roughly removing by wildcards. Made `cleanlibs` append `.dSYM` suffix for each word in `TARGET_SO`, not the end of the entire list.
2024-03-04Run POSTLINK for rubyspec CAPIEXT objectsNobuyoshi Nakada
2024-01-13[DOC] Add known_errors documentsNobuyoshi Nakada
Incorporate from The Open Group. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
2023-12-25Refresh NEWS.md at starting new development [ci skip]Nobuyoshi Nakada
2023-10-11Fix error when gems/src is read-onlyKazuhiro NISHIYAMA
When I shared srcdir as read-only in lima-vm, `make install` causes following error: ``` Update rbs to 33813a60752624d58dfe5ae770b39bfaf29fbaf1 error: cannot open .git/FETCH_HEAD: Read-only file system ``` I cannot find any ignore option for `git checkout --detach` when already checked out. So I add `if`.
2023-09-26Download Unicode files once [ci skip]Nobuyoshi Nakada
2023-09-21`.NOTPARALLEL` with prerequisites needs recent GNU MakeNobuyoshi Nakada
GNU Make prior to 4.4 just ignores the prerequisites, and runs everything in serial.
2023-09-13Enable `.NOTPARALLEL` on `ripper_srcs`Nobuyoshi Nakada
And add special treats only for old GNU make.
2023-09-11Split commit recipe and pass more macrosNobuyoshi Nakada
2023-08-17RJIT: Remove macros inherited from MJIT but no longer usedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8224
2023-08-15Use `::` form workflow commandsNobuyoshi Nakada
2023-08-14Fix test and precheck order for old GNU MakeNobuyoshi Nakada
2023-08-11Fix test-bundler dependenciesNobuyoshi Nakada
2023-08-11Fix order of test-syntax-suggest-prepare for old GNU MakeNobuyoshi Nakada
2023-07-30Extract common variablesNobuyoshi Nakada
2023-07-10Serially update only the ripper source, even with old GNU makeNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8049
2023-05-12Use Lrama LALR parser generator instead of Bisonv3_3_0_preview1Yuichiro Kaneko
https://bugs.ruby-lang.org/issues/19637 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/7798 Merged-By: yui-knk <spiketeika@gmail.com>
2023-04-18Emit special instruction for array literal + .(hash|min|max)Aaron Patterson
This commit introduces a new instruction `opt_newarray_send` which is used when there is an array literal followed by either the `hash`, `min`, or `max` method. ``` [a, b, c].hash ``` Will emit an `opt_newarray_send` instruction. This instruction falls back to a method call if the "interested" method has been monkey patched. Here are some examples of the instructions generated: ``` $ ./miniruby --dump=insns -e '[@a, @b].max' == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,12)> (catch: FALSE) 0000 getinstancevariable :@a, <is:0> ( 1)[Li] 0003 getinstancevariable :@b, <is:1> 0006 opt_newarray_send 2, :max 0009 leave $ ./miniruby --dump=insns -e '[@a, @b].min' == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,12)> (catch: FALSE) 0000 getinstancevariable :@a, <is:0> ( 1)[Li] 0003 getinstancevariable :@b, <is:1> 0006 opt_newarray_send 2, :min 0009 leave $ ./miniruby --dump=insns -e '[@a, @b].hash' == disasm: #<ISeq:<main>@-e:1 (1,0)-(1,13)> (catch: FALSE) 0000 getinstancevariable :@a, <is:0> ( 1)[Li] 0003 getinstancevariable :@b, <is:1> 0006 opt_newarray_send 2, :hash 0009 leave ``` [Feature #18897] [ruby-core:109147] Co-authored-by: John Hawthorn <jhawthorn@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/6090
2023-04-08Replace arch_flags for universal build [ci skip]Nobuyoshi Nakada
2023-03-08BundledGem.dummy_spec needs to checkout revision after cloning repository.Hiroshi SHIBATA
The current BundledGem.dummy_spec always called from master branch. It caused to CI faiulres like http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20230305T001003Z.fail.html.gz Notes: Merged: https://github.com/ruby/ruby/pull/7475
2023-03-06s/MJIT/RJIT/Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7462
2023-03-06Drop obsoleted MJIT header (#7458)Takashi Kokubun
RJIT doesn't need this. Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2023-02-22Move dummy gemspec file creation for extract-gems-sequentialNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7347
2023-02-22Use git directories instead of gemspec files as dependencyNobuyoshi Nakada
Minitest repository does not commit its gemspec file. Notes: Merged: https://github.com/ruby/ruby/pull/7347
2023-02-19No validation for bundled gemsYusuke Endoh
https://github.com/mame/ruby/actions/runs/4208869556/jobs/7305356097 ``` WARNING: open-ended dependency on irb (>= 1.5.0) is not recommended if irb is semantically versioned, use: add_runtime_dependency 'irb', '~> 1.5', '>= 1.5.0' WARNING: open-ended dependency on reline (>= 0.3.1) is not recommended if reline is semantically versioned, use: add_runtime_dependency 'reline', '~> 0.3', '>= 0.3.1' WARNING: See http://guides.rubygems.org/specification-reference/ for help /usr/lib/ruby/2.7.0/rubygems/specification_policy.rb:418:in `error': specification has warnings (Gem::InvalidSpecificationException) ``` Notes: Merged: https://github.com/ruby/ruby/pull/7339
2023-02-16Move `attached_object` into `rb_classext_struct`Jean Boussier
Given that signleton classes don't have an allocator, we can re-use these bytes to store the attached object in `rb_classext_struct` without making it larger. Notes: Merged: https://github.com/ruby/ruby/pull/7309
2023-02-13Override release date in Makefile if possibleNobuyoshi Nakada
2023-02-08Add TAGS rule [ci skip]Nobuyoshi Nakada
2023-01-26Link RUBYSPEC_CAPIEXT against the built libraryNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7186
2023-01-26Need gemspec files instead of cloned directoriesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7146
2023-01-26Fixed clone nameHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7146
2023-01-26Use timestamp files to track test revision of bundled gemsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7146
2023-01-26[Bug #19340] Fix bundle gems with test revisionNobuyoshi Nakada
Build temporary gem package from cloned repository if test revision is set. Notes: Merged: https://github.com/ruby/ruby/pull/7146
2023-01-20Run `after-update` in the same main make process [ci skip]Nobuyoshi Nakada
2023-01-05Extract only one revision in header [ci skip]Nobuyoshi Nakada
Both of `$(srcdir)/revision.h` and `revision.h` exist because they are the same file when in-place build.