Skip to content

Commit c52f4ee

Browse files
committed
Remove SortedSet autoload and set/sorted_set
Implements [Feature #21287]
1 parent a7ef9a4 commit c52f4ee

6 files changed

Lines changed: 14 additions & 68 deletions

File tree

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ The following bundled gems are updated.
105105

106106
[[Feature #21258]]
107107

108+
* With the move of `Set` from stdlib to core class, `set/sorted_set.rb` has
109+
been removed, and `SortedSet` is no longer an autoloaded constant. Please
110+
install the `sorted_set` gem and `require 'sorted_set'` to use `SortedSet`.
111+
[[Feature #21287]]
112+
108113
## C API updates
109114

110115
* IO
@@ -130,3 +135,4 @@ The following bundled gems are updated.
130135
[Bug #21049]: https://bugs.ruby-lang.org/issues/21049
131136
[Feature #21216]: https://bugs.ruby-lang.org/issues/21216
132137
[Feature #21258]: https://bugs.ruby-lang.org/issues/21258
138+
[Feature #21287]: https://bugs.ruby-lang.org/issues/21287

lib/set/sorted_set.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

prelude.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ def pp(*objs)
2626
private :pp
2727
end
2828

29-
autoload :SortedSet, 'set/sorted_set'
30-
3129
module Enumerable
3230
# Makes a set from the enumerable object with given arguments.
3331
def to_set(klass = Set, *args, &block)
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
require_relative '../../../spec_helper'
22

33
describe "SortedSet" do
4-
it "raises error including message that it has been extracted from the set stdlib" do
5-
-> {
6-
SortedSet
7-
}.should raise_error(RuntimeError) { |e|
8-
e.message.should.include?("The `SortedSet` class has been extracted from the `set` library")
9-
}
4+
ruby_version_is ""..."3.5" do
5+
it "raises error including message that it has been extracted from the set stdlib" do
6+
-> {
7+
SortedSet
8+
}.should raise_error(RuntimeError) { |e|
9+
e.message.should.include?("The `SortedSet` class has been extracted from the `set` library")
10+
}
11+
end
1012
end
1113
end

test/set/fixtures/fake_sorted_set_gem/sorted_set.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/set/test_sorted_set.rb

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)