[MacRuby] #1342: Ruby 1.9.2 Syntax

MacRuby ruby-noreply at macosforge.org
Tue Jun 28 10:25:41 PDT 2011


#1342: Ruby 1.9.2 Syntax
------------------------------------+---------------------------------------
 Reporter:  seanlilmateus@…         |       Owner:  lsansonetti@…        
     Type:  defect                  |      Status:  new                  
 Priority:  minor                   |   Milestone:  MacRuby 1.0          
Component:  MacRuby                 |    Keywords:  Syntax, Ruby 1.9.2   
------------------------------------+---------------------------------------

Comment(by seanlilmateus@…):

 puts "%d %s" % [1, "message"]                         # => "1
 message"[[BR]]

 puts "%{firstname}, %{lastname}" % {firstname: "Masao", lastname: "Mutoh"}
 # => "Masao, Mutoh" [[BR]]

 puts "%<integer>d, %<float>.1f" % { integer: 10, float: 43.476374 }   # =>
 "10, 43.5" [[BR]]

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1342#comment:1>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list