summaryrefslogtreecommitdiff
path: root/spec/ruby/command_line
AgeCommit message (Collapse)Author
2025-03-27Freeze $/ and make it ractor safeÉtienne Barrié
[Feature #21109] By always freezing when setting the global rb_rs variable, we can ensure it is not modified and can be accessed from a ractor. We're also making sure it's an instance of String and does not have any instance variables. Of course, if $/ is changed at runtime, it may cause surprising behavior but doing so is deprecated already anyway. Co-authored-by: Jean Boussier <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/12975
2025-03-27Update to ruby/spec@5e579e2Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12984
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-11-06Update to ruby/spec@54c391eBenoit Daloze
2024-10-21Show where mutated chilled strings were allocatedÉtienne Barrié
[Feature #20205] The warning now suggests running with --debug-frozen-string-literal: ``` test.rb:3: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) ``` When using --debug-frozen-string-literal, the location where the string was created is shown: ``` test.rb:3: warning: literal string will be frozen in the future test.rb:1: info: the string was created here ``` When resurrecting strings and debug mode is not enabled, the overhead is a simple FL_TEST_RAW. When mutating chilled strings and deprecation warnings are not enabled, the overhead is a simple warning category enabled check. Co-authored-by: Jean Boussier <[email protected]> Co-authored-by: Nobuyoshi Nakada <[email protected]> Co-authored-by: Jean Boussier <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/11893
2024-05-28Stop marking chilled strings as frozenÉtienne Barrié
They were initially made frozen to avoid false positives for cases such as: str = str.dup if str.frozen? But this may cause bugs and is generally confusing for users. [Feature #20205] Co-authored-by: Jean Boussier <[email protected]>
2024-04-02Update to ruby/spec@573cf97Andrew Konchin
2024-03-20[PRISM] Enable specs in CIKevin Newton
2024-03-19Implement chilled stringsÉtienne Barrié
[Feature #20205] As a path toward enabling frozen string literals by default in the future, this commit introduce "chilled strings". From a user perspective chilled strings pretend to be frozen, but on the first attempt to mutate them, they lose their frozen status and emit a warning rather than to raise a `FrozenError`. Implementation wise, `rb_compile_option_struct.frozen_string_literal` is no longer a boolean but a tri-state of `enabled/disabled/unset`. When code is compiled with frozen string literals neither explictly enabled or disabled, string literals are compiled with a new `putchilledstring` instruction. This instruction is identical to `putstring` except it marks the String with the `STR_CHILLED (FL_USER3)` and `FL_FREEZE` flags. Chilled strings have the `FL_FREEZE` flag as to minimize the need to check for chilled strings across the codebase, and to improve compatibility with C extensions. Notes: - `String#freeze`: clears the chilled flag. - `String#-@`: acts as if the string was mutable. - `String#+@`: acts as if the string was mutable. - `String#clone`: copies the chilled flag. Co-authored-by: Jean Boussier <[email protected]>
2024-02-28[PRISM] Fix version spec to account for prismKevin Newton
2024-02-15ruby-spec: Accept the receiver in backtracesYusuke Endoh
2024-02-15ruby-spec: Accept both a backtick and a single quote in error messagesYusuke Endoh
2024-02-05Update to ruby/spec@3fc4444Benoit Daloze
2023-12-23MN: skip RUBY_DESCRIPTION spec on MN enabledKoichi Sasada
2023-10-30Update to ruby/spec@bd7017fBenoit Daloze
2023-08-02Fix encoding switches when RUBYOPT is empty or only spacesBenoit Daloze
* Follow-up of dbbc3583ba432c279f07b1fa0afb0a8a9ba50c91 which broke this.
2023-06-26Update to ruby/spec@30e1c35Benoit Daloze
2023-05-24Add a newline at EOF [ci skip]Nobuyoshi Nakada
2023-04-25Update to ruby/spec@7f69c86Benoit Daloze
2023-04-20Use ASCII-compatible encoding for testsNobuyoshi Nakada
Since these files are written in a wide character encoding, stop at first NUL byte and are actually empty. ASCII-incompatible encodings have never been supported as source encoding.
2023-03-06s/MJIT/RJIT/Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7462
2022-04-25Update to ruby/spec@3affe1eBenoit Daloze
2021-12-27Skip testing --enable-all in MinGW for nowTakashi Kokubun
If we don't intend to support this platform, we should probably enable MJIT for MinGW. However, since the code for https://bugs.ruby-lang.org/issues/18439 is in place, I'm adjusting the test for it in the meantime. following up https://github.com/ruby/ruby/pull/5363
2021-12-19skip -v spec on MJITKoichi Sasada
fix this failure: ``` configure ... cppflags=-DMJIT_FORCE_ENABLE ... make test-spec 1) The -v command line option when used alone prints version and ends FAILED Expected "ruby 3.1.0dev (2021-12-18T10:10:42Z master 78c175280b) +MJIT [x86_64-linux] " to include "ruby 3.1.0dev (2021-12-18T10:10:42Z master 78c175280b) [x86_64-linux]" /tmp/ruby/v3/src/trunk-mjit-wait/spec/ruby/command_line/dash_v_spec.rb:9:in `block (3 levels) in <top (required)>' /tmp/ruby/v3/src/trunk-mjit-wait/spec/ruby/command_line/dash_v_spec.rb:4:in `<top (required)>' ``` http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3759943
2021-10-28Rename ::YJIT to RubyVM::YJITAlan Wu
Since the YJIT Ruby module is CRuby specific and not meant for general use, it should live under RubyVM instead of at top level. Notes: Merged: https://github.com/ruby/ruby/pull/5038
2021-10-28Update to ruby/spec@21a48d9Benoit Daloze
2021-10-20Fix tests with cppflags=-DYJIT_FORCE_ENABLETakashi Kokubun
https://github.com/ko1/build-ruby/commit/0dbd95c6250594b6ddadc3c4424b071704083187
2021-10-20Update to ruby/spec@d6921efBenoit Daloze
2021-07-29Update to ruby/spec@b65d01fBenoit Daloze
2021-07-17Fix a spec failureKazuhiro NISHIYAMA
``` 1) The -W command line option with :no-experimental suppresses experimental warnings FAILED Expected "" =~ /is experimental/ to be truthy but was nil ```
2021-06-02Update to ruby/spec@a0b7d0dBenoit Daloze
2020-12-21Use Integer instead of Fixnum/BignumNobuyoshi Nakada
2020-12-13Don't emit warning when the pattern of one-line pattern matching is just a ↵Kazuki Tsujimoto
variable pattern https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201210Japan.md#feature-17371-reintroduce-expr-in-pat-ktsj
2020-12-08Set default for Encoding.default_external to UTF-8 on Windows (#2877)Lars Kanis
* Use UTF-8 as default for Encoding.default_external on Windows * Document UTF-8 change on Windows to Encoding.default_external fix https://bugs.ruby-lang.org/issues/16604 Notes: Merged-By: nurse <[email protected]>
2020-11-01Fix Rubyspec (ruby-2.7) failuresKazuki Tsujimoto
https://github.com/ruby/ruby/runs/1337845174
2020-11-01use one-line pattern matching for warning testsKoichi Sasada
2020-10-26Assoc pattern matching (#3703)Nobuyoshi Nakada
[Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead. Notes: Merged-By: nobu <[email protected]>
2020-10-24Update to ruby/spec@4f59d86Benoit Daloze
2020-09-17Update to ruby/spec@e829fb0Benoit Daloze
2020-07-27Update to ruby/spec@07164daBenoit Daloze
2020-06-27Update to ruby/spec@b6b7752Benoit Daloze
2020-05-03Update to ruby/spec@032ee74Benoit Daloze
2020-04-03Refined "Drop support for ruby 2.4 from ruby/spec"Nobuyoshi Nakada
By using spec/mspec/tool/remove_old_guards.rb. Notes: Merged: https://github.com/ruby/ruby/pull/2997
2020-04-01Drop support for ruby 2.4 from ruby/specNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2892
2020-02-28Update to ruby/spec@41bf282Benoit Daloze
2019-08-29Revert "Remove warnings of flip-flop deprecation from tests and specs"Nobuyoshi Nakada
This reverts commit bf7a32d22079cc44eb19794e41d82b886d5d17b3. flip-flop is no longer deprecated. [Feature #5400]
2019-06-27Update to ruby/spec@8d74d49Benoit Daloze
2019-06-05Split an assertion for f1f04caf60e4fc9dc3b12109e0be831f2d692810Nobuyoshi Nakada
2019-06-03`ruby -v` may no longer be ASCII-only on non-master branchesNobuyoshi Nakada
2019-04-27Update to ruby/spec@15c9619Benoit Daloze