summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_rubyoptions.rb13
-rw-r--r--variable.c3
-rw-r--r--version.c22
3 files changed, 23 insertions, 15 deletions
@@ -1328,17 +1328,6 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_toplevel_ruby
- reserved = ["", [], /::Ruby is reserved/]
- env = {"RUBYOPT"=>""}
- args = %w[-e Ruby=1]
- assert_in_out_err([env, *args])
- assert_in_out_err([env, "-w", *args], *reserved)
- assert_in_out_err([env, "-W:deprecated", *args], *reserved)
- assert_in_out_err([env, "-w", "-W:no-deprecated", *args])
-
- args = ["-e", "class A; Ruby=1; end"]
- assert_in_out_err([env, *args])
- assert_in_out_err([env, "-w", *args])
- assert_in_out_err([env, "-W:deprecated", *args])
end
end
@@ -3626,9 +3626,6 @@ const_set(VALUE klass, ID id, VALUE val)
}
}
}
- if (klass == rb_cObject && id == idRuby) {
- rb_warn_reserved_name_at(3.5, "::Ruby");
- }
}
void
@@ -87,10 +87,29 @@ const char ruby_engine[] = "ruby";
// Might change after initialization
const char *rb_dynamic_description = ruby_description;
/*! Defines platform-depended Ruby-level constants */
void
Init_version(void)
{
enum {ruby_level = RUBY_LEVEL};
VALUE version = MKSTR(version);
VALUE ruby_engine_name = MKSTR(engine);
@@ -201,6 +220,7 @@ define_ruby_description(const char *const jit_opt)
append(ruby_description + ruby_description_opt_point);
# undef append
VALUE description = rb_obj_freeze(rb_usascii_str_new_static(desc, n));
rb_dynamic_description = desc;
@@ -223,7 +243,9 @@ Init_ruby_description(ruby_cmdline_options_t *opt)
void
ruby_set_yjit_description(void)
{
rb_const_remove(rb_cObject, rb_intern("RUBY_DESCRIPTION"));
define_ruby_description(YJIT_DESCRIPTION);
}