Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit e2daa08

Browse files
authored
Merge pull request #42 from jeremyevans/core-set
Exit early if using Ruby 3.5 with core Set
2 parents 1c3cded + 22423dc commit e2daa08

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/set.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# frozen_string_literal: true
2+
3+
if RUBY_VERSION >= '3.5'
4+
if defined?(Set) && defined?(Set.[]) && Set.method(:[]).source_location.nil?
5+
# Remove defined? ... conditional after Ruby 3.5.0-preview2
6+
return
7+
end
8+
end
9+
210
# :markup: markdown
311
#
412
# set.rb - defines the Set class

0 commit comments

Comments
 (0)