diff options
author | Hans de Graaff <graaff@gentoo.org> | 2015-12-25 09:46:26 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2015-12-25 09:46:50 +0100 |
commit | 89ca3a93218db57eaa570c6b942169403730c746 (patch) | |
tree | e078a7f7efb0e59c6ae4080ee8c6f966669e5c54 /dev-ruby/i18n/files | |
parent | dev-ruby/activesupport: add ruby22 (diff) | |
download | gentoo-89ca3a93218db57eaa570c6b942169403730c746.tar.gz gentoo-89ca3a93218db57eaa570c6b942169403730c746.tar.bz2 gentoo-89ca3a93218db57eaa570c6b942169403730c746.zip |
dev-ruby/i18n: add ruby22
Add an unapplied upstream pull request to make sure ruby22
tests work and to avoid similar issues with frozen classes
when using it.
Package-Manager: portage-2.2.24
Diffstat (limited to 'dev-ruby/i18n/files')
-rw-r--r-- | dev-ruby/i18n/files/i18n-0.7.0-frozen-classes.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dev-ruby/i18n/files/i18n-0.7.0-frozen-classes.patch b/dev-ruby/i18n/files/i18n-0.7.0-frozen-classes.patch new file mode 100644 index 000000000000..ff6019498fc5 --- /dev/null +++ b/dev-ruby/i18n/files/i18n-0.7.0-frozen-classes.patch @@ -0,0 +1,31 @@ +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 @@ class << self + 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 |