This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
class Pathname
|
||||
|
||||
# Platform dependent null device.
|
||||
#
|
||||
# CREDIT: Daniel Burger
|
||||
|
||||
def self.null
|
||||
case RUBY_PLATFORM
|
||||
when /mswin/i
|
||||
'NUL'
|
||||
when /amiga/i
|
||||
'NIL:'
|
||||
when /openvms/i
|
||||
'NL:'
|
||||
else
|
||||
'/dev/null'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user