You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2013/02/12 17:22:29 UTC
git commit: [Core] DTACLOUD-464 alias Array.sample for ruby 1.8.7
Updated Branches:
refs/heads/master 573bb7da2 -> ab218bbb8
[Core] DTACLOUD-464 alias Array.sample for ruby 1.8.7
https://issues.apache.org/jira/browse/DTACLOUD-464
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/ab218bbb
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/ab218bbb
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/ab218bbb
Branch: refs/heads/master
Commit: ab218bbb86074e93bda6d69473710fb917ee7049
Parents: 573bb7d
Author: marios <ma...@redhat.com>
Authored: Tue Feb 12 11:02:41 2013 +0200
Committer: marios <ma...@redhat.com>
Committed: Tue Feb 12 18:22:10 2013 +0200
----------------------------------------------------------------------
server/lib/deltacloud/core_ext/array.rb | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ab218bbb/server/lib/deltacloud/core_ext/array.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/core_ext/array.rb b/server/lib/deltacloud/core_ext/array.rb
index 620b1f4..232b216 100644
--- a/server/lib/deltacloud/core_ext/array.rb
+++ b/server/lib/deltacloud/core_ext/array.rb
@@ -22,4 +22,9 @@ class Array
def extract_opts!
last.is_a?(Hash) ? pop : {}
end
+
+ unless [].respond_to? :sample
+ alias :sample :choice
+ end
+
end