Permalink
Browse files

No need to raise if #binread offset is < 0 -- #seek takes care of it

  • Loading branch information...
Michal Bugno
Michal Bugno committed Apr 9, 2012
1 parent ed54cec commit a5df21512cc359b8b0c3fb23c97dada7ea6b8eb2
Showing with 0 additions and 1 deletion.
  1. +0 −1 kernel/common/io19.rb
View
@@ -16,7 +16,6 @@ class EAGAINWaitWritable < Errno::EAGAIN
end
def self.binread(file, length=nil, offset=0)
- raise Errno::EINVAL, file if offset < 0
raise ArgumentError, "Negative length #{length} given" if !length.nil? && length < 0
File.open(file, "rb") do |f|

0 comments on commit a5df215

Please sign in to comment.