lib/eat.rb in eat-0.0.4 vs lib/eat.rb in eat-0.0.5
- old
+ new
@@ -18,11 +18,11 @@
def eat(filesystem_path_or_uri)
uri = ::URI.parse filesystem_path_or_uri
case uri.scheme
when nil
if ::File.readable? uri.path
- ::IO.read uri.path
+ ::File.read uri.path
else
`sudo /bin/cat #{uri.path}`
end
when 'http', 'https'
require 'net/http'
@@ -39,6 +39,6 @@
end
end
end
end
-::Object.send :include, ::Eat::ObjectExtensions
+::Object.send(:include, ::Eat::ObjectExtensions) unless ::Object.method_defined?(:eat)