test/helper.rb in assert-2.15.0 vs test/helper.rb in assert-2.15.1
- old
+ new
@@ -6,5 +6,14 @@
$LOAD_PATH.unshift(ROOT_PATH)
# require pry for debugging (`binding.pry`)
require 'pry'
require 'test/support/factory'
+
+# 1.8.7 backfills
+
+# Array#sample
+if !(a = Array.new).respond_to?(:sample) && a.respond_to?(:choice)
+ class Array
+ alias_method :sample, :choice
+ end
+end