summaryrefslogtreecommitdiff
path: root/version.c
AgeCommit message (Collapse)Author
2025-12-24Reapply "Extract `ruby_api_version_name`"NARUSE, Yui
This reverts commit ba2f6972193cdbd7c1e77e26212513e47926b115. Box already used ruby_api_version_name.
2025-12-24Revert "Extract `ruby_api_version_name`"NARUSE, Yui
This reverts commit 9b576cd6255aba97e5e2f55f4b09f00c7dd0e839.
2025-12-24Remove an extra dot from `RUBY_API_VERSION_STR`Nobuyoshi Nakada
2025-11-23[Misc #21688] Teach RDoc about the toplevel module `Ruby`Nobuyoshi Nakada
Re-open the exising module by calling `rb_define_module`. RDoc (`RDoc::Parser::C#do_classes_and_modules`) does not recognize `rb_path2class` as a class/module definition.
2025-11-18ZJIT: add support for lazy `RubyVM::ZJIT.enable`Godfrey Chan
This implements Shopify#854: - Splits boot-time and enable-time initialization, tracks progress with `InitializationState` enum - Introduces `RubyVM::ZJIT.enable` Ruby method for enabling the JIT lazily, if not already enabled - Introduces `--zjit-disable` flag, which can be used alongside the other `--zjit-*` flags but prevents enabling the JIT at boot time - Adds ZJIT infra to support JIT hooks, but this is not currently exercised (Shopify/ruby#667) Left for future enhancements: - Support kwargs for overriding the CLI flags in `RubyVM::ZJIT.enable` Closes Shopify#854
2025-11-17Fix `RUBY_API_VERSION_NAME` fallback definitionNobuyoshi Nakada
2025-11-07Define ::Ruby module earlier to define classes under itSatoshi Tagomori
2025-08-14ZJIT: Fix assert failure on JIT combo buildAlan Wu
Previously, when `./configure --enable-yjit=dev --enable-zjit` JIT_DESCRIPTION was defined to be "ZJIT", but when running with `--yjit`, ruby_set_yjit_description() calls `define_ruby_description("+YJIT dev")`, which is longer than the following assertion expects: RUBY_ASSERT(n <= ruby_description_opt_point + (int)rb_strlen_lit(JIT_DESCRIPTION)); Use the concatenation of the two strings -- the contents of the string is never used. Minimize the scope of the macro, too.
2025-08-14Extract `ruby_api_version_name`Nobuyoshi Nakada
2025-04-18Implement version string for ZJITTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-02-13[Feature #21116] Extract RJIT as a third-party gemNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12740
2025-01-02Link to Ruby moduleStan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/12491
2024-12-25Show docs of constants under RubyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12451
2024-12-25[Feature #20884] Define toplevel "Ruby" module with constantsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12451
2024-12-05Standardize on the name "modular GC"Peter Zhu
We have name fragmentation for this feature, including "shared GC", "modular GC", and "external GC". This commit standardizes the feature name to "modular GC" and the implementation to "GC library". Notes: Merged: https://github.com/ruby/ruby/pull/12261
2024-11-14Include the currently active GC in RUBY_DESCRIPTIONMatt Valentine-House
This will add +MOD_GC to the version string and Ruby description when Ruby is compiled with shared gc support. When shared GC support is compiled in and a GC module has been loaded using RUBY_GC_LIBRARY, the version string will include the name of the currently active GC as reported by the rb_gc_active_gc_name function in the form +MOD_GC[gc_name] [Feature #20794] Notes: Merged: https://github.com/ruby/ruby/pull/11872
2024-10-02Assert in only one place just after adding an argumentNobuyoshi Nakada
2024-10-02Make default parser enum and define getter/setterNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11761
2024-10-02Split appending options to ruby_descriptionNobuyoshi Nakada
It's becoming tedious to map each format specifier to an argument. Notes: Merged: https://github.com/ruby/ruby/pull/11761
2024-07-18Refactor RUBY_DESCRIPTION assertions in test_rubyoptionsKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11192
2023-12-15Introduce --parser runtime flagHParker
Introduce runtime flag for specifying the parser, ``` ruby --parser=prism ``` also update the description: ``` $ ruby --parser=prism --version ruby 3.3.0dev (2023-12-08T04:47:14Z add-parser-runtime.. 0616384c9f) +PRISM [x86_64-darwin23] ``` [Bug #20044]
2023-10-19YJIT: Add RubyVM::YJIT.enable (#8705)Takashi Kokubun
2023-10-17"+MN" in descriptionKoichi Sasada
If `RUBY_MN_THREADS=1` is given, this patch shows `+MN` in `RUBY_DESCRIPTION` like: ``` $ RUBY_MN_THREADS=1 ./miniruby --yjit -v ruby 3.3.0dev (2023-10-17T04:10:14Z master 908f8fffa2) +YJIT +MN [x86_64-linux] ``` Before this patch, a warning is displayed if `$VERBOSE` is given. However it can make troubles with tests (with `$VERBOSE`), do not show any warning with a MN threads configuration.
2023-10-16Build `rb_dynamic_description` at runtimeNobuyoshi Nakada
To avoid creating literals for all combinations.
2023-08-20Move `MKSTR` markers for fake.rb into comentsNobuyoshi Nakada
2023-03-06s/mjit/rjit/Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7462
2023-03-06s/MJIT/RJIT/Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7462
2022-11-16YJIT: Show YJIT build option in RUBY_DESCRIPTION (#6738)Takashi Kokubun
YJIT: Show YJIT profile in RUBY_DESCRIPTION Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-10-24YJIT: Lazily enable YJIT after prelude (#6597)Takashi Kokubun
* YJIT: Lazily enable YJIT after prelude * Update dependencies * Use a bit field for opt->yjit Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-08-31Move macros from version.h to version.cNobuyoshi Nakada
Moved the contents of `ruby_description` and `ruby_copyright` which are never used in the other places.
2022-06-20Include JIT information in crash reportsChris Seaton
Since enabling YJIT or MJIT drastically changes what could go wrong at runtime, it's good to be front and center about whether they are enabled when dumping a crash report. Previously, `RUBY_DESCRIPTION` and the description printed when crashing can be different when a JIT is on. Introduce a new internal data global, `rb_dynamic_description`, and set it to be the same as `RUBY_DESCRIPTION` during initialization; use it when crashing. * version.c: Init_ruby_description(): Initialize and use `rb_dynamic_description`. * error.c: Change crash reports to use `rb_dynamic_description`. * ruby.c: Call `Init_ruby_description()` earlier. Slightly more work for when we exit right after printing the description but that was deemed acceptable. * include/ruby/version.h: Talk about how JIT info is not in `ruby_description`. * test/-ext-/bug_reporter/test_bug_reporter.rb: Remove handling for crash description being different from `RUBY_DESCRIPTION`. * test/ruby/test_rubyoptions.rb: ditto Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Alan Wu <alanwu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/5872
2021-12-13Rename --jit to --mjit (#5248)Takashi Kokubun
* Rename --jit to --mjit [Feature #18349] * Fix a few more --jit references * Fix MJIT Actions * More s/jit/mjit/ and re-introduce --disable-jit * Update NEWS.md * Fix test_bug_reporter_add Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-10-20Show +YJIT in version string and RUBY_DESCRIPTIONAlan Wu
There might be code out there that expect `ruby -v` to print only one line. Since MJIT shows +JIT in `ruby -v` and RUBY_DESCRIPTION, let's show +YJIT. The crash report doesn't show anything about MJIT, so adjust the test. The "test_ruby_version" test was unaware of RUBY_YJIT_ENABLE and so was failing when the variable is set and inherited into the children processes it spawns. Explicitly unset the variable in the test.
2021-10-20Yet Another Ruby JIT!Jose Narvaez
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
2021-10-20Machinery to implement deferred compilationMaxime Chevalier-Boisvert
2021-10-20ujit.h instead in the rest of RubyAlan Wu
ujit_iface.h is meant for uJIT internal use only.
2021-10-20Don't increment instr/exit counters if stats not requestedMaxime Chevalier-Boisvert
2021-10-20Fix ujit cc/cme invalidation code for opt_send_without_blockMaxime Chevalier-Boisvert
2021-10-20Refactor uJIT code into more files for readabilityMaxime Chevalier-Boisvert
2021-10-20Don't put MicroJIT status in RUBY_DESCRIPTIONAlan Wu
That messes with tests too much.
2021-10-20Show whether MicroJIT is enabled in the version stringAlan Wu
2021-09-10include/ruby/internal/interpreter.h: add doxygen卜部昌平
Must not be a bad idea to improve documents. [ci skip] In fact many functions declared in the header file are already documented more or less. They were just copy & pasted, with applying some style updates. Notes: Merged: https://github.com/ruby/ruby/pull/4815
2019-10-23Provides ruby2_keywordsNobuyoshi Nakada
So that requiring it succeeds even if that forward compatibility gem is not installed.
2019-06-06Update RDoc of RUBY_REVISIONNobuyoshi Nakada
2019-05-23Fallback RUBY_FULL_REVISION if not definedNobuyoshi Nakada
2019-05-22Make RUBY_REVISION full lengthNobuyoshi Nakada
2019-04-22Migrate RUBY_VERSION/RUBY_DESCRIPTION to GitTakashi Kokubun
from Subversion. This behavior is tentative and not discussed well. The point of discussion will be just the length of commit hash, and I thought we should include this kind of change in 2.7.0-preview1 release even before the length is fixed yet. Let's discuss that afterwards and fix it later as needed. Naruse suggested that length=10 is very unlikely to cause conflict, and thus it's used by email notification and rubyci now. This behavior is in favor of that for now.
2018-12-28Moved version numbersnobu
* Define major and minor version numbers only in the public include/ruby/version.h header, as the API version numbers. * Define only teeny version number in the private version.h header. * RUBY_VERSION moved to version.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20add disabling MJIT features option.ko1
* configure.ac: introduce new configure option `--enable-mjit` and `--disable-mjit`. Default is "enable". `--disable-mjit` disables all of MJIT features so that `ruby --jit` can't enable MJIT. This option affect a macro `USE_MJIT`. This change remove `--enable/disable-install-mjit-header` option. * Makefile.in: introduce the `ENABLE_MJIT` variable. * common.mk: use `ENABLE_MJIT` option. * internal.h: respect `USE_MJIT`. Same as other *.c, *.h. * test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-10version.c: MKSTR for fake.rbnobu
* version.c (Init_ruby_description): fake.rb needs MKSTR to extract constant names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e