backports 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- backports (3.0.3)
10
+ backports (3.1.1)
11
11
 
12
12
  GEM
13
13
  remote: http://rubygems.org/
@@ -1,10 +1,10 @@
1
1
  unless IO.respond_to? :binread
2
2
  require 'backports/tools'
3
3
 
4
- def IO.binread(file, *arg)
5
- raise ArgumentError, "wrong number of arguments (#{1+arg.size} for 1..3)" unless arg.size < 3
6
- File.open(Backports.convert_to_path(file),"rb") do |f|
7
- f.read(*arg)
4
+ def IO.binread(file, length = nil, offset = 0)
5
+ File.open(Backports.convert_path(file),"rb") do |f|
6
+ f.seek(offset)
7
+ f.read(length)
8
8
  end
9
9
  end
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "3.1.0" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
2
+ VERSION = "3.1.1" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
3
3
  end
@@ -1,13 +1,2 @@
1
- Backports should be run against RubySpec. Check https://github.com/rubyspec/rubyspec for installation instructions.
2
-
3
- Use the `--unguarded` option to run all specs, including those of versions higher than the current Ruby. Use the `-r` option to require backports.
4
-
5
- For example:
6
-
7
- cd YOUR_PATH_TO/rubyspec
8
- rvm use 1.8.7
9
- mspec core/range/cover_spec.rb --unguarded -r YOUR_PATH_TO/backports/lib/backports
10
-
11
- This will run the specs for Range#cover for Ruby 1.8.7 after loading backports.
12
-
13
- You need to check which tests fail to decide if it's OK that they do or not. For example it is to be expected that specs checking for encoding behavior will fail, as backports does not support the Ruby 1.9 encoding functionality.
1
+ `rake test` will run the tests in here.
2
+ `rake spec` will run the rubyspecs.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backports
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-05 00:00:00.000000000 Z
12
+ date: 2013-03-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Essential backports that enable many of the nice features of Ruby 1.8.7
15
15
  up to 2.0.0 for earlier versions.