Skip to content

Commit

Permalink
Fix String#chomp wrong check for separator type
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Oct 22, 2013
1 parent 51f3071 commit 33ce784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corelib/string.rb
Expand Up @@ -186,7 +186,7 @@ def chars
def chomp(separator = $/)
return self if `separator === nil || self.length === 0`

unless `other._isString == null`
if `separator._isString == null`
unless separator.respond_to? :to_str
raise TypeError, "no implicit conversion of #{separator.class.name} into String"
end
Expand Down

0 comments on commit 33ce784

Please sign in to comment.