Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/storable/files: storable-0.7.1-emptysymbol.patch
Date: Tue, 06 Apr 2010 08:48:43
Message-Id: 20100406084837.749512C03E@corvid.gentoo.org
1 flameeyes 10/04/06 08:48:37
2
3 Added: storable-0.7.1-emptysymbol.patch
4 Log:
5 Add patch to fix rudy.
6 (Portage version: 2.2_rc67/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 dev-ruby/storable/files/storable-0.7.1-emptysymbol.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/storable/files/storable-0.7.1-emptysymbol.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/storable/files/storable-0.7.1-emptysymbol.patch?rev=1.1&content-type=text/plain
13
14 Index: storable-0.7.1-emptysymbol.patch
15 ===================================================================
16 From 2e458688a077412bb1d050f5e9ca1edeb8d89bb0 Mon Sep 17 00:00:00 2001
17 From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@×××××.com>
18 Date: Tue, 6 Apr 2010 10:31:24 +0200
19 Subject: [PATCH] Handle empty symbols alike to the old Storable 0.6.4.
20
21 Without this, rudy 0.9.8 aborts for me with:
22
23 ERROR (ArgumentError): interning empty string
24
25 because there it tries to create a symbol from an empty string.
26 ---
27 lib/storable.rb | 2 +-
28 1 files changed, 1 insertions(+), 1 deletions(-)
29
30 diff --git a/lib/storable.rb b/lib/storable.rb
31 index 45a4d34..9d7c958 100644
32 --- a/lib/storable.rb
33 +++ b/lib/storable.rb
34 @@ -178,7 +178,7 @@ class Storable
35
36 next if value_orig.nil?
37
38 - if ftype == String && value_orig.to_s.empty?
39 + if ( ftype == String or ftype == Symbol ) && value_orig.to_s.empty?
40 value = ''
41 elsif ftype == Array
42 value = Array === value_orig ? value_orig : [value_orig]
43 --
44 1.7.0.4