lib/rio/scheme/temp.rb in rio-0.3.6 vs lib/rio/scheme/temp.rb in rio-0.3.7
- old
+ new
@@ -34,11 +34,11 @@
# <b>Rio is pre-alpha software.
# The documented interface and behavior is subject to change without notice.</b>
#
require 'tmpdir'
module RIO
- module Temp
+ module Temp #:nodoc: all
RESET_STATE = 'Temp::Reset'
require 'rio/rl/base'
class RL < RL::Base
RIOSCHEME = 'temp'
@@ -53,10 +53,10 @@
end
#def path() nil end
def scheme() self.class.const_get(:RIOSCHEME) end
def opaque()
td = self.escape(@tmpdir.to_s)
- td += '/' unless td.nil? or td.empty? or (td.ends_with?('/') and td != '/')
+ td += '/' unless td.nil? or td.empty? or (td != '/' and td[-1] == ?/)
td + self.escape(@prefix)
end
SPLIT_RE = %r|(?:(.*)/)?([^/]*)$|.freeze
def self.splitrl(s)