Permalink
Commits on Dec 1, 2011
  1. @Watson1978
Commits on Nov 30, 2011
  1. @Watson1978
  2. @Watson1978
  3. @Watson1978

    ext/socket: invoke NUM2OFFT before opening file because it will raise…

    … an exception when passed invalid value.
    Watson1978 committed Nov 30, 2011
  4. @Watson1978
Commits on Nov 29, 2011
  1. @Watson1978
  2. @Watson1978
Commits on Nov 28, 2011
  1. @Watson1978
  2. @Watson1978
Commits on Nov 26, 2011
  1. @Watson1978
  2. @Watson1978
Commits on Nov 19, 2011
  1. @Watson1978

    add a workaround for #1411.

    Watson1978 committed Nov 19, 2011
Commits on Nov 17, 2011
  1. @Watson1978
Commits on Nov 5, 2011
  1. @ferrous26
Commits on Nov 3, 2011
  1. @Watson1978
Commits on Nov 2, 2011
  1. @ferrous26

    Fix Range to NSRange transaltions

    Fence post error!
    ferrous26 committed Oct 31, 2011
  2. @ferrous26
Commits on Oct 26, 2011
  1. Merge pull request #47 from mkempe/rake_options

    Fixed rake error message.
    Laurent Sansonetti committed Oct 26, 2011
Commits on Oct 25, 2011
  1. @Watson1978

    Revert "Performance improvement in String#split(sep, limit). reserved…

    … an array size which is result when passed a limit."
    
    This reverts commit 6caf474.
    Watson1978 committed Oct 25, 2011
Commits on Oct 24, 2011
  1. @Watson1978

    Performance improvement in String#split(sep, limit). reserved an arra…

    …y size which is result when passed a limit.
    
    * before
          user     system      total        real
      1.710000   0.040000   1.750000 (  1.477479)
    
    * after
          user     system      total        real
      1.270000   0.050000   1.320000 (  1.076221)
    
    ----
    require 'benchmark'
    
    Benchmark.bm do |x|
      str = "abcdefg0123456789\n" * 2000
      x.report do
        1000.times do
          str.split("\n", 1000)
        end
      end
    end
    Watson1978 committed Oct 24, 2011
Commits on Oct 21, 2011
  1. [✔] Fixed rake error message.

    Maik Kempe committed Oct 21, 2011
Commits on Oct 19, 2011
  1. @Watson1978
Commits on Oct 17, 2011
  1. new license stuff

    Laurent Sansonetti committed Oct 17, 2011
  2. master is now 0.12

    Laurent Sansonetti committed Oct 17, 2011
  3. add BSDL file

    Laurent Sansonetti committed Oct 17, 2011
  4. update to new ruby license

    Laurent Sansonetti committed Oct 17, 2011
Commits on Oct 16, 2011
  1. @Watson1978

    Performance improvement in StringIO. do not use the values via access…

    …or method.
    
    * before
          user     system      total        real
      0.180000   0.000000   0.180000 (  0.155949)
    
    * after
          user     system      total        real
      0.150000   0.000000   0.150000 (  0.131242)
    
    ----
    require 'benchmark'
    require 'stringio'
    
    Benchmark.bm do |x|
      str = "x" * 100000
      io = StringIO.new(str)
    
      x.report do
        100000.times do
          io.getc
        end
      end
    end
    Watson1978 committed Oct 16, 2011
  2. @Watson1978

    Performance improvement in StringScanner#scan

    * before
          user     system      total        real
      0.030000   0.000000   0.030000 (  0.018517)
    * after
          user     system      total        real
      0.020000   0.000000   0.020000 (  0.015783)
    ----
    require 'benchmark'
    require 'strscan'
    Benchmark.bm do |x|
      str = "x" * 500000
      s = StringScanner.new(str)
      x.report do
        s.scan(/./)
      end
    end
    Watson1978 committed Oct 16, 2011
  3. @Watson1978

    Performance improvement in StringScanner. do not use the values via a…

    …ccessor method.
    
    * before
          user     system      total        real
      0.000000   0.000000   0.000000 (  0.003927)
    
    * after
          user     system      total        real
      0.000000   0.000000   0.000000 (  0.002341)
    
    ----
    require 'benchmark'
    require 'strscan'
    
    Benchmark.bm do |x|
      str = "x" * 500000
      s = StringScanner.new(str)
      x.report do
        1000.times do
          s.concat "a"
        end
      end
    end
    Watson1978 committed Oct 16, 2011
  4. @Watson1978

    Performance improvement in StringScanner#rest_size

    * before
          user     system      total        real
      0.200000   0.010000   0.210000 (  0.211851)
    
    * after
          user     system      total        real
      0.010000   0.000000   0.010000 (  0.004731)
    
    ----
    require 'benchmark'
    require 'strscan'
    
    Benchmark.bm do |x|
      str = "x" * 50000
      s = StringScanner.new(str)
      x.report do
        10000.times do
          s.rest_size
        end
      end
    
    end
    Watson1978 committed Oct 16, 2011
Commits on Oct 15, 2011
  1. @Watson1978

    StringIO#getc will raise an exception when closed a reading stream.

    ----
    require 'stringio'
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    io = StringIO.new("hello")
    io.close_read
    assert_raise(IOError) { io.getc }
    Watson1978 committed Oct 15, 2011
  2. @Watson1978

    StringIO#write will raise an exception when closed a writing stream a…

    …nd passed a n empty string.
    
    ----
    require 'stringio'
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    io = StringIO.new("hello")
    io.close_write
    assert_raise(IOError) { io.write("") }
    
    io = StringIO.new("hello".freeze)
    assert_raise(IOError) { io.write("") }
    Watson1978 committed Oct 15, 2011
  3. @Watson1978

    StringIO#ungetc will raise an exception when closed a reading stream …

    …and passed a nil.
    
    ----
    require 'stringio'
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    io = StringIO.new("A")
    io.close_read
    assert_raise(IOError) { io.ungetc(nil) }
    Watson1978 committed Oct 15, 2011
  4. @Watson1978
Commits on Oct 14, 2011
  1. @Watson1978

    Performance improvement in str_resize_bytes. because reallocation of …

    …the long string is slow, memory allocate more size than the specified size.
    
    * before
          user     system      total        real
      3.870000   2.790000   6.660000 (  5.048851)
    
    * after
          user     system      total        real
      0.030000   0.010000   0.040000 (  0.037597)
    
    ----
    require 'benchmark'
    
    Benchmark.bm do |x|
      str = "aaa"
      x.report do
        5000.times do
          str << "x" * rand(1000)
        end
      end
    
    end
    Watson1978 committed Oct 14, 2011