Skip to content

Commit

Permalink
Use duck-typing to decide whether to extend string.
Browse files Browse the repository at this point in the history
  • Loading branch information
Empact committed Mar 14, 2013
1 parent 2ddf5ef commit e9c9b43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/roo/excelx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'rubygems'
require 'nokogiri'

if RUBY_VERSION < '1.9.0'
unless ''.respond_to?(:end_with?)
class String
def end_with?(str)
self[-str.length,str.length] == str
Expand Down

0 comments on commit e9c9b43

Please sign in to comment.