aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-05-07 18:09:20 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-05-07 18:09:20 +0530
commit6e83330590eafc52aa65ed17f8764414fc16346a (patch)
tree4de21b5cdf8d15c11b8007bbd0ec716f3679faa7 /activesupport/lib/active_support/core_ext
parent3056b3379b8ca5d859e8237c46d6abe7f67a5d09 (diff)
downloadrails-6e83330590eafc52aa65ed17f8764414fc16346a.tar.gz
rails-6e83330590eafc52aa65ed17f8764414fc16346a.tar.bz2
rails-6e83330590eafc52aa65ed17f8764414fc16346a.zip
fixes incorrect error message for sample method
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/array/random_access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/random_access.rb b/activesupport/lib/active_support/core_ext/array/random_access.rb
index 9eba4642b8..bb1807a68a 100644
--- a/activesupport/lib/active_support/core_ext/array/random_access.rb
+++ b/activesupport/lib/active_support/core_ext/array/random_access.rb
@@ -7,7 +7,7 @@ class Array
#
# [1,2,3,4,5,6].sample # => 4
# [1,2,3,4,5,6].sample(3) # => [2, 4, 5]
- # [1,2,3,4,5,6].sample(-3) # => ArgumentError: negative sample number
+ # [1,2,3,4,5,6].sample(-3) # => ArgumentError: negative array size
# [].sample # => nil
# [].sample(3) # => []
def sample(n=nil)