From d83b78166c0596d1aa4d141ff0d95ddf66af0d7d Mon Sep 17 00:00:00 2001 From: Patrick Lin Date: Wed, 31 Jan 2024 17:57:21 -0800 Subject: [PATCH] Remove constant `Random::DEFAULT` --- CHANGELOG.md | 1 + spec/tags/core/random/default_tags.txt | 2 -- src/main/ruby/truffleruby/core/random.rb | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 spec/tags/core/random/default_tags.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 74fe2c50306f..14fb8829786c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Bug fixes: * Fix using the `--cpusampler` profiler when there are custom unblock functions for `rb_thread_call_without_gvl()` (#3013, @eregon). * Fix recursive raising `FrozenError` exception when redefined `#inspect` modifies an object (#3388, @andrykonchin). * Fix `Integer#div` returning the wrong object type when the divisor is a `Rational` (@simonlevasseur, @nirvdrum). +* Remove constant `Random::DEFAULT` (#3039, @patricklinpl) Compatibility: diff --git a/spec/tags/core/random/default_tags.txt b/spec/tags/core/random/default_tags.txt deleted file mode 100644 index 584290227c90..000000000000 --- a/spec/tags/core/random/default_tags.txt +++ /dev/null @@ -1,2 +0,0 @@ -slow:Random::DEFAULT changes seed on reboot -fails:Random::DEFAULT is no longer defined diff --git a/src/main/ruby/truffleruby/core/random.rb b/src/main/ruby/truffleruby/core/random.rb index 47565e0950f5..14fa064bd49f 100644 --- a/src/main/ruby/truffleruby/core/random.rb +++ b/src/main/ruby/truffleruby/core/random.rb @@ -53,9 +53,6 @@ def initialize(value) end class Random - DEFAULT = self - deprecate_constant :DEFAULT - def self.new_seed Primitive.thread_randomizer.generate_seed end