<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -82,13 +82,6 @@ module GetText
   # Extends PoMessage for RubyParser.
   # Implements a sort of state machine to assist the parser.
   module PoMessageForRubyParser
-    PARAMS = {
-      :normal =&gt; [:msgid],
-      :plural =&gt; [:msgid, :msgid_plural],
-      :msgctxt =&gt; [:msgctxt, :msgid],
-      :msgctxt_plural =&gt; [:msgctxt, :msgid, :msgid_plural]
-    }
-
     # Supports parsing by setting attributes by and by.
     def set_current_attribute(str)
       param = @param_type[@param_number]
@@ -98,7 +91,6 @@ module GetText
 
     def init_param
       @param_number = 0
-      @param_type = PARAMS[@type]
       self
     end
 
@@ -127,13 +119,13 @@ module GetText
     # (and ignored here). 
     # And You don't need to keep the pomessages as unique.
 
-    def parse(path, deprecated = nil)  # :nodoc:
+    def parse(path, deprecated = [])  # :nodoc:
       lines = IO.readlines(path)
-      parse_lines(path, lines)
+      parse_lines(path, lines, deprecated)
     end
 
     def parse_lines(path, lines, deprecated = [])  # :nodoc:
-      pomessages = []
+      pomessages = deprecated
       file = StringIO.new(lines.join + &quot;\n&quot;)
       rl = RubyLexX.new
       rl.set_input(file)</diff>
      <filename>lib/gettext/tools/parser/ruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,13 @@ module GetText
   # Contains data related to the expression or sentence that
   # is to be translated.
   class PoMessage
+    PARAMS = {
+      :normal =&gt; [:msgid],
+      :plural =&gt; [:msgid, :msgid_plural],
+      :msgctxt =&gt; [:msgctxt, :msgid],
+      :msgctxt_plural =&gt; [:msgctxt, :msgid, :msgid_plural]
+    }
+
     @@max_line_length = 70
 
     # Sets the max line length.
@@ -30,6 +37,7 @@ module GetText
     def initialize(type)
       @type = type
       @sources = []
+      @param_type = PARAMS[@type]
     end
 
     # Support for extracted comments. Explanation s.
@@ -178,6 +186,12 @@ module GetText
       ret.msgid_plural = msgid_plural
       ret
     end
+
+    def [](number)
+      param = @param_type[number]
+      raise ParseError, 'no more string parameters expected' unless param
+      send param
+    end
   end
   
 end</diff>
      <filename>lib/gettext/tools/pomessage.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0d6d77803aa96bd61e45569e8d8d37fbde1ec2d5</id>
    </parent>
  </parents>
  <author>
    <name>Masao Mutoh</name>
    <email>mutomasa@gmail.com</email>
  </author>
  <url>http://github.com/mutoh/gettext/commit/bea3a181da8d171c8859e4ad28f963c8d7d74f79</url>
  <id>bea3a181da8d171c8859e4ad28f963c8d7d74f79</id>
  <committed-date>2009-11-08T06:36:37-08:00</committed-date>
  <authored-date>2009-11-08T06:36:37-08:00</authored-date>
  <message>tools/parser/ruby.rb, tools/pomessage.rb:
Move PARAMS to PoMessage. Fix trivial bugs.</message>
  <tree>ebf346094722a9714d1f5697efc9d2680089f5a7</tree>
  <committer>
    <name>Masao Mutoh</name>
    <email>mutomasa@gmail.com</email>
  </committer>
</commit>
