Created
October 5, 2011 13:45
-
-
Save abevoelker/1264464 to your computer and use it in GitHub Desktop.
JRuby File#size monkeypatch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apparently JRuby doesn't have a File#size (instance) method, | |
# but does have the equivalent class method | |
if !File.method_defined? :size | |
class File | |
def size | |
File.size(path) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment