Sha256: 0d150ff7304c359393dfcf34aa9f7c6ac7892e3915569eea717282f456956f66
Contents?: true
Size: 592 Bytes
Versions: 12
Compression:
Stored size: 592 Bytes
Contents
module Backports TARGET_VERSION = caller.each{|c| break $1 if c =~ /set_version\/(\d\.\d\.\d)\.rb/} end unless Object.const_defined?(:Enumerator) || Backports::TARGET_VERSION < '1.9' require 'enumerator' # Needed for mspec: Enumerator = Enumerable::Enumerator end if RUBY_VERSION < Backports::TARGET_VERSION && Backports::TARGET_VERSION >= '1.9' require 'backports/1.9.2/float/infinity.rb' # Used in many specs... require 'backports/1.9.2/float/nan.rb' # Used in many specs... end def frozen_error_class begin [1].freeze.pop rescue Exception => e e.class end end
Version data entries
12 entries across 12 versions & 3 rubygems