Skip to content

Commit

Permalink
dup the default_path_rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Masao Mutoh committed Mar 22, 2009
1 parent 95bdda1 commit ad56797
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/gettext/locale_path.rb
Expand Up @@ -35,7 +35,7 @@ def self.add_default_rule(path)
# Returns path rules as an Array.
# (e.g.) ["/usr/share/locale/%{lang}/LC_MESSAGES/%{name}.mo", ...]
def self.default_path_rules
return @@default_path_rules if @@default_path_rules.size > 0
return @@default_path_rules.dup if @@default_path_rules.size > 0

if ENV["GETTEXT_PATH"]
ENV["GETTEXT_PATH"].split(/,/).each {|i|
Expand All @@ -53,7 +53,7 @@ def self.default_path_rules
"#{$1}/locale/%{lang}/%{name}.mo"]
end
}
@@default_path_rules
@@default_path_rules.dup
end

# Clear path_rules for testing.
Expand Down

0 comments on commit ad56797

Please sign in to comment.