lib/ole/support.rb in ruby-ole-1.2.10.1 vs lib/ole/support.rb in ruby-ole-1.2.11
- old
+ new
@@ -1,5 +1,7 @@
+# encoding: ASCII-8BIT
+
#
# A file with general support functions used by most files in the project.
#
# These are the only methods added to other classes.
#
@@ -23,16 +25,18 @@
end
class File # :nodoc:
# for interface consistency with StringIO etc (rather than adding #stat
# to them). used by RangesIO.
- def size
- stat.size
+ unless File.instance_methods.include?(:size)
+ def size
+ stat.size
+ end
end
end
class Symbol # :nodoc:
- unless :x.respond_to? :to_proc
+ unless Symbol.instance_methods.include?(:to_proc)
def to_proc
proc { |a| a.send self }
end
end
end