Permalink
Browse files

StringIO#gets(sep, limit) does not raise TypeError when sep is nil

  • Loading branch information...
1 parent 3589442 commit 69e6be7abf06412c77e9f3307f57a93f94c5a5b4 @krekoten krekoten committed Apr 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/19/stringio.rb
View
@@ -528,7 +528,7 @@ def getline(*args)
end
end
when 2
- sep = Rubinius::Type.coerce_to(args[0], String, :to_str)
+ sep = Rubinius::Type.check_convert_type(args[0], String, :to_str)
limit = Rubinius::Type.coerce_to(args[1], Integer, :to_int)
end

0 comments on commit 69e6be7

Please sign in to comment.