diff --git a/lib/roo/excelx.rb b/lib/roo/excelx.rb
index <HASH>..<HASH> 100644
--- a/lib/roo/excelx.rb
+++ b/lib/roo/excelx.rb
@@ -3,7 +3,7 @@ require 'date'
 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
Use duck-typing to decide whether to extend string.