lib/tzinfo/timezone.rb in tzinfo-0.3.0 vs lib/tzinfo/timezone.rb in tzinfo-0.3.1
- old
+ new
@@ -79,10 +79,12 @@
instance = @@loaded_zones[identifier]
unless instance
raise InvalidTimezoneIdentifier, 'Invalid identifier' if identifier !~ /^[A-z0-9\+\-_]+(\/[A-z0-9\+\-_]+)*$/
identifier = identifier.gsub(/-/, '__m__').gsub(/\+/, '__p__')
begin
- require "tzinfo/definitions/#{identifier}"
+ # Use a temporary variable to avoid an rdoc warning
+ file = "tzinfo/definitions/#{identifier}"
+ require file
m = Definitions
identifier.split(/\//).each {|part|
m = m.const_get(part)
}