Permalink
Commits on Feb 8, 2012
  1. pass correct length to memchr, because it does not stop at '\0'. adju…

    Watson1978 committed Feb 8, 2012
    …st read data length, because become large value after adding separator length.
Commits on Feb 7, 2012
Commits on Feb 5, 2012
Commits on Feb 3, 2012
  1. Restore install dependency on framework:info_plist

    ferrous26 committed Feb 3, 2012
    Fixing MacRuby ticket #1440
  2. Rakefile should not be forced to be verbose

    ferrous26 committed Feb 2, 2012
    With this option, it is impossible to make rake quiet. Things still seem to be noisy
    enough without forcing the option to be turned on.
Commits on Feb 2, 2012
  1. add the rubyspec's tags

    Watson1978 committed Feb 2, 2012
Commits on Feb 1, 2012
  1. fix named argument

    Watson1978 committed Feb 1, 2012
    Test Script:
    ----
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal(
      "foo, bar",
      "%{firstname}, %{lastname}" % {firstname: "foo", lastname: "bar"}
    )
    
    assert_equal(
      "10, 43.5",
      "%<integer>d, %<float>.1f" % { integer: 10, float: 43.476374 }
    )
    
    assert_equal(
      "10<float>",
      "%{integer}<float>" % { integer: 10, float: 43.476374 }
    )
    
    assert_raise(ArgumentError){ "%<foo><bar>" % { foo: 10, bar: 42 } }
    #----
    assert_equal(
      "01 : 02",
      "%<foo>02d : %<bar>02d" % { :foo => 1, :bar => 2 }
    )
    
    assert_equal(
      "01<foo>",
      "%02d<foo>" % [1, {:foo => 1}]
    )
    assert_raise(ArgumentError){ "%s %1$s" % "foo" }
    assert_raise(ArgumentError){ "%02d%<foo>" % [1, {:foo => 1}] }
    assert_raise(ArgumentError){ "%1$<key2>s" % {:key => "value"} }
Commits on Jan 31, 2012
Commits on Jan 30, 2012
  1. Added dylib files

    danielwestendorf committed Jan 30, 2012
  2. allow omitting width at precision

    Watson1978 committed Jan 30, 2012
    Test Script:
    ----
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal("42", "%.d" % [42.34])
    assert_equal("42", "%.*d" % [0, 42.34])
    
    assert_raise(ArgumentError){ "%. d" % 42 }
    assert_raise(ArgumentError){ "%.#d" % 42 }
    assert_raise(ArgumentError){ "%.+d" % 42 }
    assert_raise(ArgumentError){ "%.-d" % 42 }
    
    assert_raise(ArgumentError){ "%* d" % 42 }
    assert_raise(ArgumentError){ "%*#d" % 42 }
    assert_raise(ArgumentError){ "%*+d" % 42 }
    assert_raise(ArgumentError){ "%*-d" % 42 }
  3. check whether width is specified after precision

    Watson1978 committed Jan 30, 2012
    Test Script:
    ----
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_raise(ArgumentError){ "%.4*d" % [42, 2] }
Commits on Jan 29, 2012
  1. allow multiple named argument in String#%. fix #1342

    Watson1978 committed Jan 29, 2012
    Test Script:
    ----
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal(
      "foo, bar",
      "%{firstname}, %{lastname}" % {firstname: "foo", lastname: "bar"}
    )
    
    assert_equal(
      "10, 43.5",
      "%<integer>d, %<float>.1f" % { integer: 10, float: 43.476374 }
    )
    
    assert_equal(
      "10<float>",
      "%{integer}<float>" % { integer: 10, float: 43.476374 }
    )
    
    assert_raise(ArgumentError){ "%<foo><bar>" % { foo: 10, bar: 42 } }
Commits on Jan 28, 2012
Commits on Jan 27, 2012
  1. Clear a couple of todos from install.rake

    ferrous26 committed Jan 27, 2012
    Centralizing directory creation breaks modularity, though they can be grouped inside each task.
Commits on Jan 26, 2012
  1. check message of exception

    Watson1978 committed Jan 26, 2012
    Test Script:
    ----
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    class ZeroDivisionError
      def self.new(message)
        42
      end
    end
    
    assert_raise(TypeError){ 1/0 }