parent
af0ff410e1
commit
a1f5e33fc0
@ -1,34 +0,0 @@
|
||||
From bbbdedc0c78ec941a84d161d5c610a358310cf99 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Tue, 20 Jan 2015 14:34:44 +0100
|
||||
Subject: [PATCH] Ignore metadata for frozen classes.
|
||||
|
||||
---
|
||||
lib/i18n/backend/metadata.rb | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/i18n/backend/metadata.rb b/lib/i18n/backend/metadata.rb
|
||||
index 52c0a29..a8d922a 100644
|
||||
--- a/lib/i18n/backend/metadata.rb
|
||||
+++ b/lib/i18n/backend/metadata.rb
|
||||
@@ -21,11 +21,15 @@ module I18n
|
||||
def included(base)
|
||||
Object.class_eval do
|
||||
def translation_metadata
|
||||
- @translation_metadata ||= {}
|
||||
+ unless self.frozen?
|
||||
+ @translation_metadata ||= {}
|
||||
+ else
|
||||
+ {}
|
||||
+ end
|
||||
end
|
||||
|
||||
def translation_metadata=(translation_metadata)
|
||||
- @translation_metadata = translation_metadata
|
||||
+ @translation_metadata = translation_metadata unless self.frozen?
|
||||
end
|
||||
end unless Object.method_defined?(:translation_metadata)
|
||||
end
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (i18n-1.0.0.gem) = 627720c14413886e0932e962147cac453339a4532301d51931d75413909640487872c478fca3920e71e041c9b375facb4a85dd41dc75111e77c3505275757bcf
|
||||
SHA512 (i18n-1.1.1.gem) = 8007386062323af8a9e8e87d5be15cce5a661f8f499cd47132625af35f914bac4c8b69e60ce6722e5fe57d4552a372615aaf9d0df20595e5c1e9a96100ab85a4
|
||||
|
Loading…
Reference in new issue