1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
From: Hleb Valoshka <375GNU@Gmail.COM>
Date: Wed, 8 Aug 2012 21:23:52 +0300
Subject: process RubyToken::TkDSTRING too
- this patch fixes bug #684182
---
lib/gettext/tools/parser/ruby.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/gettext/tools/parser/ruby.rb b/lib/gettext/tools/parser/ruby.rb
index 79703a9..218b4a3 100644
--- a/lib/gettext/tools/parser/ruby.rb
+++ b/lib/gettext/tools/parser/ruby.rb
@@ -21,7 +21,7 @@ module GetText
def parse
until ( (tk = token).kind_of?(RubyToken::TkEND_OF_SCRIPT) && !@continue or tk.nil? )
s = get_readed
- if RubyToken::TkSTRING === tk
+ if RubyToken::TkSTRING === tk or RubyToken::TkDSTRING === tk
def tk.value
@value
end
@@ -44,7 +44,7 @@ module GetText
end
if $DEBUG
- if tk.is_a? TkSTRING
+ if tk.is_a? TkSTRING or tk.is_a? TkDSTRING
$stderr.puts("#{tk}: #{tk.value}")
elsif tk.is_a? TkIDENTIFIER
$stderr.puts("#{tk}: #{tk.name}")
@@ -153,7 +153,7 @@ module GetText
pomessage = nil
end
line_no = tk.line_no.to_s
- when RubyToken::TkSTRING
+ when RubyToken::TkSTRING, RubyToken::TkDSTRING
pomessage.set_current_attribute tk.value if pomessage
when RubyToken::TkPLUS, RubyToken::TkNL
#do nothing
|