Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added sort_by! for Ruby 1.8

  • Loading branch information...
commit 598b2a85a140b1fba7e8cb3c271323fee93ffc77 1 parent 50a87dd
Peter Wagenet wagenet authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/sproutcore/helpers/entry_sorter.rb
11 lib/sproutcore/helpers/entry_sorter.rb
View
@@ -7,6 +7,17 @@
require "set"
+
+# Backwards compatibility for Ruby 1.8
+class Array
+ unless method_defined?(:sort_by!)
+ def sort_by!(*args, &block)
+ replace(sort_by(*args, &block))
+ end
+ end
+end
+
+
module SC
module Helpers
Please sign in to comment.
Something went wrong with that request. Please try again.