Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 2, 2011
  1. @Watson1978

    updates flag of string in advance when duplicates a string.

    Watson1978 authored
    * before
          user     system      total        real
      0.790000   0.100000   0.890000 (  0.866363)
    * after
          user     system      total        real
      0.090000   0.100000   0.190000 (  0.185894)
    ----
    require 'benchmark'
    Benchmark.bm do |x|
      x.report {
        str = "abc" * 100_000 + "\n"
        1000.times do
          str.chomp
        end
      }
    end
Commits on Aug 31, 2011
  1. @Watson1978
  2. @Watson1978

    Performance improvement in String#chop when string is included only a…

    Watson1978 authored
    …scii-compatible characters.
    
    * before
          user     system      total        real
      0.660000   0.000000   0.660000 (  0.665421)
    * after
          user     system      total        real
      0.000000   0.000000   0.000000 (  0.001805)
    ----
    require 'benchmark'
    Benchmark.bm do |x|
      x.report {
        str = "abc" * 100_000
        1000.times do
          str.chop!
        end
      }
    end
  3. @Watson1978

    Performance improvement in rb_str_get_uchar when string is included o…

    Watson1978 authored
    …nly ascii-compatible characters.
    
    * before
          user     system      total        real
      1.570000   0.000000   1.570000 (  1.568804)
    
    * after
          user     system      total        real
      0.660000   0.000000   0.660000 (  0.665421)
    
    ----
    require 'benchmark'
    
    Benchmark.bm do |x|
      x.report {
        str = "abc" * 100_000
        1000.times do
          str.chop!
        end
      }
    end
  4. define ENCODING_GET_INLINED() as a shortcut to ENCODING_GET()

    Laurent Sansonetti authored
Commits on Aug 30, 2011
  1. @Watson1978

    String#relace: avoid the memory allocation when replace self with a s…

    Watson1978 authored
    …horter than or equal string.
    
    * before
          user     system      total        real
      0.170000   0.010000   0.180000 (  0.141742)
    * after
          user     system      total        real
      0.120000   0.000000   0.120000 (  0.106536)
    ----
    require 'benchmark'
    Benchmark.bm do |x|
      x.report {
        str = "abc" * 1024
        100_000.times do
          str.replace("hello")
        end
      }
    end
  2. @Watson1978
Commits on Aug 20, 2011
  1. @alloy
  2. @alloy

    Add Range#relative_to(max) which expands negative values.

    alloy authored
    This is especially helpful for Objective-C/C APIs that expect a NS/CFRange.
  3. @alloy
  4. @alloy
  5. @Watson1978
Commits on Aug 19, 2011
  1. @alloy

    Merge pull request #41 from connormontgomery/patch-1

    alloy authored
    fixed a typo.
  2. @connor

    fixed a typo.

    connor authored
Commits on Aug 18, 2011
  1. @Watson1978
  2. @Watson1978

    Date.valid_civil? does not raise exception. (merged from CRuby)

    Watson1978 authored
    ruby/ruby@7d4e89a
    
    Test Script:
    {{{
    require 'date'
    p Date.valid_civil? 2010, -13, -1  # => false
    }}}
Commits on Aug 17, 2011
  1. @Watson1978
  2. @Watson1978
  3. @Watson1978
Commits on Aug 16, 2011
  1. @Watson1978

    Indentation is not required with literal and fold style.

    Watson1978 authored
    Test Script:
    {{{
    require 'yaml'
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    str = "hoge\nfoo"
    yaml = str.to_yaml
    assert_equal("--- |-\nhoge\nfoo\n", yaml)
    
    str = "hoge\nfoo"
    def str.to_yaml_style
      :fold
    end
    yaml = str.to_yaml
    assert_equal("--- >-\nhoge\n\nfoo\n", yaml)
    
    puts :ok
    }}}
  2. @Watson1978

    String#to_yaml returns the string of yaml with literal style when inc…

    Watson1978 authored
    …ludes the newlines.
    
    Test Script:
    {{{
    require 'yaml'
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    str = "hoge\nfoo"
    def str.to_yaml_style
    end
    
    yaml = str.to_yaml
    assert_match(/^--- \|-\n/, yaml)
    
    puts :ok
    }}}
Commits on Aug 11, 2011
  1. @Watson1978
Commits on Aug 10, 2011
  1. @Watson1978

    Merge pull request #40 from jhemmelg/master

    Watson1978 authored
    Fix for ticket #203.
Commits on Aug 9, 2011
  1. @jhemmelg

    Ticket #203: Marshal.dump does not serialize an Exception's backtrace

    jhemmelg authored
    Revert behavior to CRuby.  Internal classes don't necessarily put an '@'
    at the beginning of instance variables, so we need to ignore it.
  2. @Watson1978
  3. @Watson1978

    Thread#inspect will return string which copied receiver's status of t…

    Watson1978 authored
    …aint/untrust.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    th = Thread.new { 42 }
    th.taint
    th.untrust
    assert_equal(true, th.inspect.tainted?)
    assert_equal(true, th.inspect.untrusted?)
    puts :ok
    }}}
Commits on Aug 8, 2011
  1. @Watson1978
Commits on Aug 7, 2011
  1. @Watson1978

    Merge pull request #39 from jhemmelg/master

    Watson1978 authored
    This should close out issue #542, attempt to unlock mutex which is not locked.
  2. @jhemmelg

    Issue #542: Attempt to unlock a mutex which is not locked (ThreadError)

    jhemmelg authored
    Re-lock the mutex at the end of mutex_sleep in thread.c.
  3. @Watson1978
  4. @Watson1978
  5. @Watson1978
Commits on Aug 2, 2011
  1. @Watson1978

    Merge pull request #38 from martinh/fix_CFBundleExecutable

    Watson1978 authored
    Make CFBundleExecutable in Info.plist match the actual bundle executable.
  2. @martinh
Something went wrong with that request. Please try again.