Ruby On CSV turn in to an array of ...

by Sporkmonger, September 05, 2008 19:38

I'd recommend using FasterC...

56ee28134dd0776825445e3551979b14 Talk
1
super((array.map { |element| block.call(element).clone }.group_by { |element| element.delete_at(0) }).to_a)

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 19:25

This is the fix for the off...

56ee28134dd0776825445e3551979b14 Talk
1
2
3
4
  it "should correctly sort the array" do
    result = [
...

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 19:21

Adding in a call to Hash#to...

56ee28134dd0776825445e3551979b14 Talk

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 18:47

Enumerable#group_by returns...

56ee28134dd0776825445e3551979b14 Talk

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 17:31

>> ActiveSupport::OrderedHa...

56ee28134dd0776825445e3551979b14 Talk

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 17:18

Adam,

Interesting, but I c...

56ee28134dd0776825445e3551979b14 Talk
1
2
3
4
module Enumerable
  # Sorts the enumeration by mapping the
  # values in the enumeration through the given block.
...

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 14:04

Another minor improvement.

56ee28134dd0776825445e3551979b14 Talk
1
2
3
4
require File.dirname(__FILE__) + '/../spec_helper'

describe Enumerable, "when sorting in multiple directions" do
...

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 13:41

Some specs:

56ee28134dd0776825445e3551979b14 Talk
1
2
3
4
module Enumerable
  # Sorts the enumeration by mapping the
  # values in the enumeration through the given block.
...

Ruby On sort_by_multiple

by Sporkmonger, September 05, 2008 13:38

Minor improvement.

56ee28134dd0776825445e3551979b14 Talk
1
2
3
4
module Enumerable
  # Sorts the enumeration by mapping the
  # values in the enumeration through the given block.
...

Ruby sort_by_multiple

by Sporkmonger, September 05, 2008 13:11, 12 refactorings, tagged with speed, sorting

require "benchmark"
data_s...

56ee28134dd0776825445e3551979b14 Talk