diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-05-31 15:52:32 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-06-19 18:46:55 +0900 |
commit | 63aadc237f48be23803acae724401f8b4221fa38 (patch) | |
tree | 96ea77c66f42685bacacca4e69ac64139d93620d /array.rb | |
parent | 49f0fd21e468e567dc122547d516eef42c0ce0d3 (diff) |
[Feature #16254] Use `Primitive.func` style
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3165
Diffstat (limited to 'array.rb')
-rw-r--r-- | array.rb | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -13,7 +13,7 @@ class Array # # a.shuffle!(random: Random.new(1)) #=> [1, 3, 2] def shuffle!(random: Random) - __builtin.rb_ary_shuffle_bang(random) + Primitive.rb_ary_shuffle_bang(random) end # call-seq: @@ -30,7 +30,7 @@ class Array # # a.shuffle(random: Random.new(1)) #=> [1, 3, 2] def shuffle(random: Random) - __builtin.rb_ary_shuffle(random) + Primitive.rb_ary_shuffle(random) end # call-seq: @@ -57,6 +57,6 @@ class Array # a.sample(random: Random.new(1)) #=> 6 # a.sample(4, random: Random.new(1)) #=> [6, 10, 9, 2] def sample(n = (ary = false), random: Random) - __builtin.rb_ary_sample(random, n, ary) + Primitive.rb_ary_sample(random, n, ary) end end |