[ruby/psych] Add support for ruby 3.2 Data objects
[ruby.git] / prelude.rb
bloba381db8ccee4a4f832d567eb88e5df6986065279
1 class Binding
2   # :nodoc:
3   def irb(...)
4     begin
5       require 'irb'
6     rescue LoadError, Gem::LoadError
7       Gem::BUNDLED_GEMS.force_activate 'irb'
8       require 'irb'
9     end
10     irb(...)
11   end
13   # suppress redefinition warning
14   alias irb irb # :nodoc:
15 end
17 module Kernel
18   def pp(*objs)
19     require 'pp'
20     pp(*objs)
21   end
23   # suppress redefinition warning
24   alias pp pp # :nodoc:
26   private :pp
27 end
29 autoload :SortedSet, 'set/sorted_set'
31 module Enumerable
32   # Makes a set from the enumerable object with given arguments.
33   def to_set(klass = Set, *args, &block)
34     klass.new(self, *args, &block)
35   end
36 end