Permalink
Commits on Dec 13, 2010
  1. creating branch for 0.8 release

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/branches/0.8@5019 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 13, 2010
  2. Even if Array is empty, when given a block, Array#product will return…

    … a self.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    ary = []
    ret = ary.product([3,4,5],[6,8]) {}
    assert_equal(ary, ret)
    assert_equal(ary.object_id, ret.object_id)
    
    ret = ary.product([3,4,5],[6,8])
    assert_equal(ary, ret)
    assert_not_equal(ary.object_id, ret.object_id)
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5018 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 13, 2010
  3. When given a block, Array#product will yield a product element and re…

    …turn a self.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    ary    = [1, 2]
    result = []
    ret1 = ary.product([3,4,5],[6,8]) {|a| result << a}
    assert_equal(ary, ret1)
    
    ret2 = ary.product([3,4,5],[6,8])
    assert_equal(result, ret2)
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5017 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 13, 2010
Commits on Dec 12, 2010
  1. IO#close, #close_read and #close_write will throw SecurityError when …

    …$SAFE is 4.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    def safe_4
      t = Thread.new do
        $SAFE = 4
        yield
      end.join
    end
    
    r, w = IO.pipe
    assert_raise(SecurityError) do
      safe_4 { r.close_read }
    end
    
    assert_raise(SecurityError) do
      safe_4 { r.close_write }
    end
    
    assert_raise(SecurityError) do
      safe_4 { r.close }
    end
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5016 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 12, 2010
Commits on Dec 11, 2010
  1. sprintf("%c") will throw an exception when does not pass one character.

    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
    Watson1978 committed Dec 11, 2010
Commits on Dec 10, 2010
  1. String#delete (and #count and friends): fix a bug when an escaped das…

    …h character in the transliteration pattern would still be interpreted as a range
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5014 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 10, 2010
  2. Module.nesting: return an empty array instead of nil in case the top …

    …object isn't a module
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5013 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 10, 2010
  3. implement Module.nesting

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5012 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 10, 2010
  4. oops, I mistook a condition with r5010.

    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    assert_equal(["\n\n\n", "hello\n\n\n\n", "and\nworld\n\n\n\n\n\n"], "\n\n\nhello\n\n\n\nand\nworld\n\n\n\n\n\n".lines('').to_a)
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5011 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 10, 2010
  5. clean up the unnecessary space within r5008.

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5009 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 10, 2010
Commits on Dec 9, 2010
  1. IO.new: don't raise a warning in case a block is passed

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5007 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 9, 2010
  2. Fixing a bug that prevented CSV from parsing all multi-line fields co…

    …rrectly. Merged from CRuby 1.9 r28431.
    
    see ruby/ruby@effa0c7
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4999 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 9, 2010
  3. Array#uniq will not remove the element of Array when object type is d…

    …ifferent.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    a1 = [ 1, 1.0, "1.0", 2, 1.0, 1]
    a2 = a1.dup
    assert_equal([1, 1.0, "1.0", 2], a1.uniq)
    assert_equal([1, 1.0, "1.0", 2], a2.uniq!)
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4998 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 9, 2010
Commits on Dec 8, 2010
  1. Array#pack will return a untrusted string when the format is untrusted

    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    ary = ["abcd", 0x20]
    fmt = "A3C"
    fmt.untrust
    fmt.taint
    
    ret = ary.pack(fmt)
    assert_equal("abc ", ret)
    assert_equal(true,   ret.tainted?)
    assert_equal(true,   ret.untrusted?)
    
    puts :ok
    }}}
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4996 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 8, 2010
  2. remove lib/dispatch layer

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4994 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 8, 2010
  3. move to llvm 2.8

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4993 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 8, 2010
Commits on Dec 7, 2010
  1. Dir.glob: convert paths to unicode normalization form C

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4991 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 7, 2010
  2. updates the spec's tags.

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4989 23306eb0-4c56-4727-a40e-e92c0eb68959
    Watson1978 committed Dec 7, 2010
  3. move internal stuff from the public headers

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4988 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 7, 2010
Commits on Dec 6, 2010
  1. implement last_line $_ VM variable (patch by Ben Mitchell <warpflyght…

    … at telltales.net>)
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4986 23306eb0-4c56-4727-a40e-e92c0eb68959
    lrz committed Dec 6, 2010
  2. Tag failing specs.

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4985 23306eb0-4c56-4727-a40e-e92c0eb68959
    alloy committed Dec 6, 2010
  3. fixed a bug in his morning's commit that was making ['a'.encode('UTF-…

    …16LE')].join.valid_encoding? crash
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4983 23306eb0-4c56-4727-a40e-e92c0eb68959
    vincentisambart committed Dec 6, 2010