Skip to content

Commit fe7a510

Browse files
committed
Add require 'set' for Ruby < 3.2 compatibility
Set class became a core class in Ruby 3.2, but earlier versions (2.7, 3.0, 3.1) require explicit 'require "set"' to use it. This fixes NameError: uninitialized constant IRB::Set.
1 parent 1227226 commit fe7a510

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/irb/init.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
55
#
66

7+
require 'set'
8+
79
module IRB # :nodoc:
810
@CONF = {}
911
@INITIALIZED = false

0 commit comments

Comments
 (0)