Sha256: d378207acabcacfc9177a073172cf5849144a8d203feecec0ce8b4f561486a83

Contents?: true

Size: 584 Bytes

Versions: 26

Compression:

Stored size: 584 Bytes

Contents

begin
  File.open(__FILE__) { |f| IO.open(f.fileno, :mode => 'r').close }
rescue TypeError
  require 'backports/tools'

  class << IO
    def open_with_options_hash(*args)
      if args.size > 2 || args[1].respond_to?(:to_hash)
        fd, mode, options = (args << Backports::Undefined)
        args = [fd, Backports.combine_mode_and_option(mode, options)]
      end
      if block_given?
        open_without_options_hash(*args){|f| yield f}
      else
        open_without_options_hash(*args)
      end
    end

    Backports.alias_method_chain self, :open, :options_hash
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
scout_realtime-1.0.5 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-1.0.4 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-1.0.3 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-1.0.3.pre lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-1.0.2 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-1.0.1 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-1.0.0 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-0.5.5 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-0.5.5.pre lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-0.5.4 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
backports-3.6.0 lib/backports/1.9.1/io/open.rb
backports-3.5.0 lib/backports/1.9.1/io/open.rb
backports-3.4.1 lib/backports/1.9.1/io/open.rb
scout_realtime-0.5.3 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-0.5.2 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
scout_realtime-0.5.1 lib/vendor/backports-3.3.5/lib/backports/1.9.1/io/open.rb
backports-3.4.0 lib/backports/1.9.1/io/open.rb
backports-3.3.5 lib/backports/1.9.1/io/open.rb
backports-3.3.4 lib/backports/1.9.1/io/open.rb
backports-3.3.3 lib/backports/1.9.1/io/open.rb