<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">12714</assigned-user-id>
  <attachments-count type="integer">2</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2009-07-06T01:34:41+01:00</created-at>
  <creator-id type="integer">20836</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer">9903</milestone-id>
  <number type="integer">2870</number>
  <permalink>ruby-19-style-string-interpolation-support-for-lower-ruby-versions</permalink>
  <priority type="integer">1960</priority>
  <project-id type="integer">8994</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>committed</state>
  <tag>2-3-stable 3.0 patch</tag>
  <title>Ruby 1.9 style String interpolation support for lower ruby versions.</title>
  <updated-at type="datetime">2009-07-18T21:11:52+01:00</updated-at>
  <user-id type="integer">17393</user-id>
  <user-name>Repository</user-name>
  <creator-name>Lawrence Pit</creator-name>
  <assigned-user-name>Yehuda Katz (wycats)</assigned-user-name>
  <url>http://rails.lighthouseapp.com/projects/8994/tickets/2870</url>
  <milestone-title>2.x</milestone-title>
  <original-body>Attached patch adds ruby 1.9 style String interpolation support for lower ruby versions. Thanks to code from Masao Mutoh's GetText gem.

The reason for including this patch is that for I18n we'd like to switch from &quot;{{arg}}&quot; style named arguments to standard ruby 1.9 syntax, i.e. : &quot;%{arg}&quot;. This makes later upgrades to ruby 1.9 easier and it makes string interpolation a lot more powerful/flexible than what is currently possible.</original-body>
  <latest-body>Attached patch adds ruby 1.9 style String interpolation support for lower ruby versions. Thanks to code from Masao Mutoh's GetText gem.

The reason for including this patch is that for I18n we'd like to switch from &quot;{{arg}}&quot; style named arguments to standard ruby 1.9 syntax, i.e. : &quot;%{arg}&quot;. This makes later upgrades to ruby 1.9 easier and it makes string interpolation a lot more powerful/flexible than what is currently possible.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;Attached patch adds ruby 1.9 style String interpolation support
for lower ruby versions. Thanks to code from Masao Mutoh's GetText
gem.&lt;/p&gt;
&lt;p&gt;The reason for including this patch is that for I18n we'd like
to switch from &quot;{{arg}}&quot; style named arguments to standard ruby 1.9
syntax, i.e. : &quot;%{arg}&quot;. This makes later upgrades to ruby 1.9
easier and it makes string interpolation a lot more
powerful/flexible than what is currently possible.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Attached patch adds ruby 1.9 style String interpolation support for lower ruby versions. Thanks to code from Masao Mutoh's GetText gem.

The reason for including this patch is that for I18n we'd like to switch from &quot;{{arg}}&quot; style named arguments to standard ruby 1.9 syntax, i.e. : &quot;%{arg}&quot;. This makes later upgrades to ruby 1.9 easier and it makes string interpolation a lot more powerful/flexible than what is currently possible.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Attached patch adds ruby 1.9 style String interpolation support
for lower ruby versions. Thanks to code from Masao Mutoh's GetText
gem.&lt;/p&gt;
&lt;p&gt;The reason for including this patch is that for I18n we'd like
to switch from &quot;{{arg}}&quot; style named arguments to standard ruby 1.9
syntax, i.e. : &quot;%{arg}&quot;. This makes later upgrades to ruby 1.9
easier and it makes string interpolation a lot more
powerful/flexible than what is currently possible.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-06T01:34:41+01:00</created-at>
      <creator-id type="integer">20836</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2870</number>
      <permalink>ruby-19-style-string-interpolation-support-for-lower-ruby-versions</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>3.0 patch</tag>
      <title>Ruby 1.9 style String interpolation support for lower ruby versions.</title>
      <updated-at type="datetime">2009-07-06T01:34:46+01:00</updated-at>
      <user-id type="integer">20836</user-id>
      <user-name>Lawrence Pit</user-name>
      <creator-name>Lawrence Pit</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2870</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>+1 this would make our upgrade path to ruby 1.9 much smoother AND add a ton of flexibility to our interpolation api

Jeremy, wdyt? :)</body>
      <body-html>&lt;div&gt;&lt;p&gt;+1 this would make our upgrade path to ruby 1.9 much smoother
AND add a ton of flexibility to our interpolation api&lt;/p&gt;
&lt;p&gt;Jeremy, wdyt? :)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-06T11:38:38+01:00</created-at>
      <creator-id type="integer">20836</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2870</number>
      <permalink>ruby-19-style-string-interpolation-support-for-lower-ruby-versions</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>3.0 patch</tag>
      <title>Ruby 1.9 style String interpolation support for lower ruby versions.</title>
      <updated-at type="datetime">2009-07-06T11:38:42+01:00</updated-at>
      <user-id type="integer">7400</user-id>
      <user-name>Sven Fuchs</user-name>
      <creator-name>Lawrence Pit</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2870</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">85</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>(from [da635394c1c3004f4dacf4a35275404e5b1aef43]) Ruby 1.9 style String interpolation support for lower ruby versions. Thanks to code from Masao Mutoh's GetText gem. [#2870 state:resolved]

Signed-off-by: Yehuda Katz &lt;wycats@yehuda-katzs-macbookpro41.local&gt;
http://github.com/rails/rails/commit/da635394c1c3004f4dacf4a35275404e5b1aef43</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/8994/changesets/da635394c1c3004f4dacf4a35275404e5b1aef43&quot;
title=
&quot;Changeset [da635394c1c3004f4dacf4a35275404e5b1aef43]&quot;&gt;[da635394c1c3004f4dacf4a35275404e5b1aef43]&lt;/a&gt;)
Ruby 1.9 style String interpolation support for lower ruby
versions. Thanks to code from Masao Mutoh's GetText gem. [&lt;a href=
&quot;/projects/8994/tickets/2870&quot; title=&quot;Ticket #2870&quot;&gt;#2870&lt;/a&gt;
state:resolved]&lt;/p&gt;
&lt;p&gt;Signed-off-by: Yehuda Katz
&lt;a&gt;wycats@yehuda-katzs-macbookpro41.local&lt;/a&gt;&lt;br&gt;
&lt;a href=
&quot;http://github.com/rails/rails/commit/da635394c1c3004f4dacf4a35275404e5b1aef43&quot;&gt;
http://github.com/rails/rails/commit/da635394c1c3004f4dacf4a3527540...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-08T00:22:25+01:00</created-at>
      <creator-id type="integer">20836</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2870</number>
      <permalink>ruby-19-style-string-interpolation-support-for-lower-ruby-versions</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>resolved</state>
      <tag>3.0 patch</tag>
      <title>Ruby 1.9 style String interpolation support for lower ruby versions.</title>
      <updated-at type="datetime">2009-07-08T00:22:26+01:00</updated-at>
      <user-id type="integer">17393</user-id>
      <user-name>Repository</user-name>
      <creator-name>Lawrence Pit</creator-name>
      <assigned-user-name>Jeremy Kemper</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2870</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12714</assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Thanks for applying, Yehuda :)

Couple of things:

I noticed the tests don't pass on Ruby 1.9 because Masao's code does not mirror Ruby 1.9's behaviour exactly, but the tests of course specify what the code does. This is true for two situations where Ruby 1.9 raises exceptions while Masao's extension doesn't: 

* Ruby 1.9 raises a KeyError exception for missing named interpolation args (e.g. &quot;%{foo}&quot; % {:bar =&gt; :bar})
* Ruby 1.9 raises an ArgumentError when mixing named and unnamed placeholders (e.g. &quot;%{foo} %f&quot; % [1.0])

Also, we'll only want to include this code when we're on &lt; Ruby 1.9.

I'll append a patch that fixes these things and also improves the docs and Rails conventions compliance a little bit.

After applying this, can you please also BACKPORT this to 2.3-stable? That'd be great :)

I'll reopen the ticket and assign to Yehuda.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks for applying, Yehuda :)&lt;/p&gt;
&lt;p&gt;Couple of things:&lt;/p&gt;
&lt;p&gt;I noticed the tests don't pass on Ruby 1.9 because Masao's code
does not mirror Ruby 1.9's behaviour exactly, but the tests of
course specify what the code does. This is true for two situations
where Ruby 1.9 raises exceptions while Masao's extension
doesn't:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ruby 1.9 raises a KeyError exception for missing named
interpolation args (e.g. &quot;%{foo}&quot; % {:bar =&amp;gt; :bar})&lt;/li&gt;
&lt;li&gt;Ruby 1.9 raises an ArgumentError when mixing named and unnamed
placeholders (e.g. &quot;%{foo} %f&quot; % [1.0])&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, we'll only want to include this code when we're on &amp;lt;
Ruby 1.9.&lt;/p&gt;
&lt;p&gt;I'll append a patch that fixes these things and also improves
the docs and Rails conventions compliance a little bit.&lt;/p&gt;
&lt;p&gt;After applying this, can you please also BACKPORT this to
2.3-stable? That'd be great :)&lt;/p&gt;
&lt;p&gt;I'll reopen the ticket and assign to Yehuda.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-07-08T17:26:08+01:00</created-at>
      <creator-id type="integer">20836</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 3.0 patch
:state: resolved
:assigned_user: 85
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2870</number>
      <permalink>ruby-19-style-string-interpolation-support-for-lower-ruby-versions</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>open</state>
      <tag>2-3-stable 3.0 patch</tag>
      <title>Ruby 1.9 style String interpolation support for lower ruby versions.</title>
      <updated-at type="datetime">2009-07-08T17:26:14+01:00</updated-at>
      <user-id type="integer">7400</user-id>
      <user-name>Sven Fuchs</user-name>
      <creator-name>Lawrence Pit</creator-name>
      <assigned-user-name>Yehuda Katz (wycats)</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2870</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">12714</assigned-user-id>
      <attachments-count type="integer">2</attachments-count>
      <body>(from [17d5cc12b9f8d0d78a081d231e7e0c5ec9df1104]) * don't include String#% for Ruby 1.9
* raise a KeyError exception for missing named interpolation args (like Ruby 1.9 does)
* raise an ArgumentError when mixing named and unnamed placeholders (like Ruby 1.9 does)
* improve docs and comply a bit more w/ Rails names/conventions

[#2870 state:committed]

Signed-off-by: Jeremy Kemper &lt;jeremy@bitsweat.net&gt;
http://github.com/rails/rails/commit/17d5cc12b9f8d0d78a081d231e7e0c5ec9df1104</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/8994/changesets/17d5cc12b9f8d0d78a081d231e7e0c5ec9df1104&quot;
title=
&quot;Changeset [17d5cc12b9f8d0d78a081d231e7e0c5ec9df1104]&quot;&gt;[17d5cc12b9f8d0d78a081d231e7e0c5ec9df1104]&lt;/a&gt;)
* don't include String#% for Ruby 1.9 * raise a KeyError exception
for missing named interpolation args (like Ruby 1.9 does) * raise
an ArgumentError when mixing named and unnamed placeholders (like
Ruby 1.9 does) * improve docs and comply a bit more w/ Rails
names/conventions&lt;/p&gt;
&lt;p&gt;[&lt;a href=&quot;/projects/8994/tickets/2870&quot; title=
&quot;Ticket #2870&quot;&gt;#2870&lt;/a&gt; state:committed]&lt;/p&gt;
&lt;p&gt;Signed-off-by: Jeremy Kemper &lt;a&gt;jeremy@bitsweat.net&lt;/a&gt;&lt;br&gt;
&lt;a href=
&quot;http://github.com/rails/rails/commit/17d5cc12b9f8d0d78a081d231e7e0c5ec9df1104&quot;&gt;
http://github.com/rails/rails/commit/17d5cc12b9f8d0d78a081d231e7e0c...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-18T21:11:50+01:00</created-at>
      <creator-id type="integer">20836</creator-id>
      <diffable-attributes type="yaml">--- 
:state: open
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">2870</number>
      <permalink>ruby-19-style-string-interpolation-support-for-lower-ruby-versions</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>committed</state>
      <tag>2-3-stable 3.0 patch</tag>
      <title>Ruby 1.9 style String interpolation support for lower ruby versions.</title>
      <updated-at type="datetime">2009-07-18T21:11:52+01:00</updated-at>
      <user-id type="integer">17393</user-id>
      <user-name>Repository</user-name>
      <creator-name>Lawrence Pit</creator-name>
      <assigned-user-name>Yehuda Katz (wycats)</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/2870</url>
      <milestone-title>2.x</milestone-title>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>f98bb348f9f396f1ebf10742542601a59f22bd4b</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2009-07-06T01:35:37+01:00</created-at>
      <filename>string_interpolation.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">214521</id>
      <size type="integer">6786</size>
      <uploader-id type="integer">20836</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/214521/string_interpolation.diff</url>
    </attachment>
    <attachment type="Attachment">
      <code>3524e55cbe77381962db8e75d98d5aca1bee1d48</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2009-07-08T17:26:08+01:00</created-at>
      <filename>0001-1.-don-t-include-String-for-Ruby-1.9.patch</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">216587</id>
      <size type="integer">8349</size>
      <uploader-id type="integer">7400</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/216587/0001-1.-don-t-include-String-for-Ruby-1.9.patch</url>
    </attachment>
  </attachments>
</ticket>
