Permalink
Commits on Feb 15, 2011
  1. Bump version and configure

    Evan Phoenix committed Feb 15, 2011
  2. Add 1.2.1 release notes and regen site

    Evan Phoenix committed Feb 15, 2011
  3. Use proper conversion semantics for year

    Evan Phoenix committed Feb 15, 2011
  4. Check for libs by prepending lib too. Fixes #663

    Evan Phoenix committed Feb 15, 2011
  5. Remove some old, crusty tasks

    Evan Phoenix committed Feb 15, 2011
  6. Make set_superclass private to declare intent. Fixes #659

    Evan Phoenix committed Feb 15, 2011
  7. Show metaclasses more clearly

    Evan Phoenix committed Feb 15, 2011
  8. Don't allow nils, so use num2long. Fixes #668

    Evan Phoenix committed Feb 15, 2011
  9. Add a few more arg type check specs for Time

    Evan Phoenix committed Feb 15, 2011
  10. Format fix some Time specs

    Evan Phoenix committed Feb 15, 2011
Commits on Feb 14, 2011
  1. Be defensive about using write(2) as it is a fickle beast

    Evan Phoenix committed Feb 14, 2011
  2. Avoid long DelegatedMethod chains. Fixes #679

    Evan Phoenix committed Feb 14, 2011
  3. Add spec for IO#expect

    Evan Phoenix committed Feb 14, 2011
  4. Add IO#expect extract from the pty extension

    Evan Phoenix committed Feb 14, 2011
  5. IO.select should return any read IO with data buffered

    Evan Phoenix committed Feb 14, 2011
Commits on Feb 12, 2011
  1. Changes the threshold in Array#sort for determining whether to use in…

    …sertion sort or quicksort. The threshold was 6, but it is now 13. Results and methodology below.
    
    ## Code
    
    def quicksort(v, tally=[])
      return v if v.nil? or v.length <= 1
      less, more = v[1..-1].partition { |i| tally << 1; i < v[0] }
      quicksort(less, tally) + [v[0]] + quicksort(more, tally)
    end
    
    def qsort(v)
      array = []
      quicksort(v, array)
      array.size
    end
    
    def isort(list)
      tally = 0
      for i in 1..(list.length - 1)
        value = list[i]
        j = i - 1
        while j >= 0 and list[j] > value
          list[j + 1] = list[j]
          j -= 1
          tally += 1
        end
        list[j + 1] = value
      end
      tally
    end
    
    def random_array(size)
      array = []
      size.times { array << rand(1_000_000) }
      array
    end
    
    class Array
      def average
        sum / size
      end
    
      def sum
        inject(0) {|s, v| s + v }
      end
    end
    
    #################################
    q_results = Array.new(51) { [] }
    i_results = Array.new(51) { [] }
    
    10_000.times do
      (1..50).map do |i|
        q_results[i] << qsort(random_array(i))
        i_results[i] << isort(random_array(i))
      end
    end
    
    puts "Size\t| Quicksort\t| Insertio[i].average}\t| #{i_results[i].average}"
    end
    
    ## Results
    Size    | Quicksort     | Insertion sort
    1       | 0     | 0
    2       | 1     | 0
    3       | 2     | 1
    4       | 4     | 2
    5       | 7     | 5
    6       | 10    | 7
    7       | 13    | 10
    8       | 16    | 14
    9       | 20    | 17
    10      | 24    | 22
    11      | 28    | 27
    12      | 32    | 32
    13      | 37    | 38
    14      | 41    | 45
    15      | 46    | 52
    16      | 51    | 59
    17      | 55    | 68
    18      | 60    | 76
    19      | 65    | 85
    20      | 71    | 94
    21      | 76    | 104
    22      | 81    | 115
    23      | 87    | 126
    24      | 92    | 138
    25      | 98    | 150
    26      | 104   | 162
    27      | 110   | 175
    28      | 115   | 188
    29      | 121   | 203
    30      | 127   | 217
    31      | 134   | 232
    32      | 139   | 247
    33      | 145   | 264
    34      | 152   | 280
    35      | 158   | 297
    36      | 164   | 314
    37      | 171   | 333
    38      | 177   | 351
    39      | 184   | 370
    40      | 191   | 390
    41      | 197   | 410
    42
    43      | 211   | 452
    44      | 216   | 472
    45      | 224   | 494
    46      | 231   | 517
    47      | 238   | 541
    48      | 244   | 563
    49      | 251   | 588
    50      | 258   | 612
    
    real    1m57.527s
    user    1m56.007s
    sys     0m0.314s
    
    ## uname -a
    Darwin baits-190183.reshall.umich.edu 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 i386
    seydar committed Feb 12, 2011
Commits on Feb 11, 2011
  1. Name customization correctly.

    wycats committed Feb 11, 2011
Commits on Feb 9, 2011
  1. Reorganize the compiler documentation around the compilation stages a…

    …nd add a stub for a stage customization document
    wycats committed Feb 9, 2011
  2. Adding some documentation for the Rubinius parser and adding a stub p…

    …age for customizing the Rubinius compiler pipeline
    wycats committed Feb 9, 2011
Commits on Feb 8, 2011
  1. Add spec for module_eval + lexical constant scope

    Evan Phoenix committed Feb 8, 2011
  2. Added subcommand docs to loader help. Closes #662.

    Brian Ford committed Feb 8, 2011
  3. Set the proper bytecode position of a when. Fixes #661

    Evan Phoenix committed Feb 8, 2011
Commits on Feb 5, 2011