Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 15, 2011
  1. update copyrights to 2011

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5168 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Jan 8, 2011
  1. include/ruby/macruby.h -> macruby_internal.h

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5137 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Jan 5, 2011
  1. introduce a better unichar API, which should be as fast as before the…

    Laurent Sansonetti authored
    … recent string datastore change, also fixing the rubygems crasher and also various memory leaks
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5114 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Dec 11, 2010
  1. Watson

    sprintf("%c") will throw an exception when does not pass one character.

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_raise(ArgumentError) { sprintf("%c", "cc") }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5015 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Nov 26, 2010
  1. Watson

    sprintf() will be given a format which is width's * and precision's *.

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal("   1.00000", sprintf("%*.*f", 10, 5, 1))
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4950 23306eb0-4c56-4727-a40e-e92c0eb68959
  2. Watson

    sprintf() will be given the positional arguments and precision tokens…

    Watson1978 authored
    … given for one format.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal("0", sprintf("%2$1d", 1, 0))
    assert_equal("001", sprintf("%2$03d", 0, 1))
    
    assert_equal("0.00", sprintf("%2$.2f", 1, 0))
    assert_equal("1.00", sprintf("%2$.2f", 0, 1))
    
    assert_raise(ArgumentError){ sprintf("%1$<key>s", :key => "value") }
    assert_raise(ArgumentError){ sprintf("%5d %<key>s", 10, :key => "value") }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4949 23306eb0-4c56-4727-a40e-e92c0eb68959
  3. Watson

    fixed the bug of sprintf() within "%{named}" format.

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal("value", sprintf("%{key}", :key => "value"))
    assert_equal("1234.56", sprintf("%{key}", :key => 1234.56))
    assert_equal("value{key2}", sprintf("%{key}{key2}", :key => "value"))
    assert_raise(ArgumentError) {sprintf("%1${key2}", :key => "value")}
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4948 23306eb0-4c56-4727-a40e-e92c0eb68959
  4. Watson

    sprintf() will throw an exception when was given named format twice.

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_raise(ArgumentError) {sprintf("%<key><key2>s", { :key => "value", :key2 => "test" }) }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4947 23306eb0-4c56-4727-a40e-e92c0eb68959
  5. Watson

    fixed the bug of sprintf() within "%<named>" format

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal("value", sprintf("%<key>s", :key => "value"))
    assert_equal("12345", sprintf("%<test>d", :test=> 12345))
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4946 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Nov 23, 2010
  1. Watson

    sprintf() will throw an exception when was given positional format tw…

    Watson1978 authored
    …ice.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_raise(ArgumentError){ sprintf("%1$1$s", "foo") }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4939 23306eb0-4c56-4727-a40e-e92c0eb68959
  2. Watson

    String#% will throw an ArgumentError when was given "*0$" format.

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_raise(ArgumentError){ "%*0$s" % [5, "x"] }
    assert_raise(ArgumentError){ "%*1$.*0$1$s" % [1, 2, 3] }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4938 23306eb0-4c56-4727-a40e-e92c0eb68959
  3. Watson

    sprintf() will throw an exception when was given precision format twice.

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_raise(ArgumentError){ sprintf("%.5.5s", 5) }
    assert_raise(ArgumentError){ sprintf("%.5.*s", 5, 5) }
    assert_raise(ArgumentError){ sprintf("%.*.5s", 5, 5) }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4932 23306eb0-4c56-4727-a40e-e92c0eb68959
  4. Watson

    sprintf() will throw an exception when was given width format twice.

    Watson1978 authored
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_raise(ArgumentError){ sprintf("%**s", 5, 5, 5) }
    assert_raise(ArgumentError){ sprintf("%5*s", 5, 5) }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4931 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Nov 22, 2010
  1. Watson

    modified the style of r4928.

    Watson1978 authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4929 23306eb0-4c56-4727-a40e-e92c0eb68959
  2. Watson

    sprintf() will not throw exception when passed the format of single %…

    Watson1978 authored
    … character before a '\n' or '\0'.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal("%", sprintf("%", ""))
    assert_equal("foo%", sprintf("foo%", ""))
    assert_equal("%\n", sprintf("%\n", ""))
    assert_equal("%\n.3f", sprintf("%\n.3f", 1.2))
    assert_equal("%\x00.3f", sprintf("%\0.3f", 1.2))
    assert_raise(ArgumentError){ sprintf("% ", "") }
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4928 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Aug 30, 2010
  1. #sprintf: don't try to mutate symbols

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4478 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Jul 8, 2010
  1. Move Obj-C related headers around.

    Thibault Martin-Lagardette authored
    Snything that is Obj-C related is now in a separate header. This will avoid "true" to already be defined for example.
    
     - Fixes <rdar://problem/7871199>
     - Fixes #728
    
    
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4330 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Mar 19, 2010
  1. fixed a few bugs in #sprintf

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3819 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Mar 18, 2010
  1. fixed some bugs in Numeric#chr

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3811 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Mar 6, 2010
  1. some sprintf fixes

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/branches/icu@3711 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Mar 2, 2010
  1. unicode string formats (a work in progress)

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/branches/icu@3663 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Feb 26, 2010
  1. added #%, added remaining NSString primitives

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/branches/icu@3630 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on Feb 11, 2010
  1. sprintf can now be free of C++ evil

    Laurent Sansonetti authored
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3488 23306eb0-4c56-4727-a40e-e92c0eb68959
Commits on May 23, 2009
  1. the great schism, part I

    Laurent Sansonetti authored
Commits on Mar 11, 2009
  1. committing experimental branch content

    Laurent Sansonetti authored
Something went wrong with that request. Please try again.