Issue #17490 has been updated by Eregon (Benoit Daloze).


If we'd consider RubyVM is CRuby-specific, then it seems fine.
However, that's rather unclear, and then the question is what should other Ruby implementations should do `RubyVM::MJIT` and its methods?
(other Ruby implementations might be forced to define `RubyVM` for compatibility at some point, it wouldn't surprise me)

I think Ruby users should anyway not need to use RubyVM::MJIT methods, so I prefer the more precise `MJIT` name.
`RubyVM` is already awfully confusing. `RubyVM::JIT` sounds like a general/portable API (from the name) when it is in fact CRuby-specific.

IMHO, a benchmark harness should not need to use a JIT-specific API, so I think `pause`/`resume` are only useful for debugging.

`RubyVM::MJIT.enabled?` could become a portable API, but it would need to move somewhere else.
I'm also unsure if it's needed besides MRI tests, in part because all major Ruby implementations already show if there is a JIT in `RUBY_DESCRIPTION`.

----------------------------------------
Feature #17490: Rename RubyVM::MJIT to RubyVM::JIT
https://bugs.ruby-lang.org/issues/17490#change-89639

* Author: k0kubun (Takashi Kokubun)
* Status: Open
* Priority: Normal
----------------------------------------
## Background
In my understanding, MJIT is a codename like YARV which many people outside Ruby community are not familiar with, so I've used JIT in NEWS or release notes to avoid explaining the "M" part whenever we release a new version. However, because we have the name "MJIT" in one of our constants, we've had some naming inconsistency. For instance, --jit is not --mjit and it's not consistent.

## Proposal
Have the same constant as `RubyVM::JIT`, deprecate `RubyVM::MJIT` from Ruby 3.1, and remove the old one in Ruby 3.2.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>