| 1 | From b1c38d58d5e94df8c74c9c69c2f9b5841589a4bd Mon Sep 17 00:00:00 2001
|
| 2 | From: =?UTF-8?q?C=C3=A9dric=20Boutillier?= <[email protected]>
|
| 3 | Date: Mon, 23 Sep 2024 23:47:22 +0200
|
| 4 | Subject: [PATCH] Replace deprecated Fixnum by Integer
|
| 5 |
|
| 6 | https://github.com/jordansissel/ruby-flores/pull/14
|
| 7 |
|
| 8 | ---
|
| 9 | lib/flores/random.rb | 2 +-
|
| 10 | spec/flores/random_spec.rb | 2 +-
|
| 11 | 2 files changed, 2 insertions(+), 2 deletions(-)
|
| 12 |
|
| 13 | diff --git a/lib/flores/random.rb b/lib/flores/random.rb
|
| 14 | index e512b80..ec44f8b 100644
|
| 15 | |
| 16 | |
| 17 | @@ -32,7 +32,7 @@ module Flores::Random
|
| 18 | # * The length can be a number or a range `x..y`. If a range, it must be ascending (x < y)
|
| 19 | # * Negative lengths are not permitted and will raise an ArgumentError
|
| 20 | #
|
| 21 | - # @param length [Fixnum or Range] the length of text to generate
|
| 22 | + # @param length [Integer or Range] the length of text to generate
|
| 23 | # @return [String] the generated text
|
| 24 | def self.text(length)
|
| 25 | return text_range(length) if length.is_a?(Range)
|
| 26 | diff --git a/spec/flores/random_spec.rb b/spec/flores/random_spec.rb
|
| 27 | index 9e479fb..0e792c3 100644
|
| 28 | |
| 29 | |
| 30 | @@ -108,7 +108,7 @@
|
| 31 | end
|
| 32 |
|
| 33 | describe "#integer" do
|
| 34 | - it_behaves_like Numeric, Fixnum do
|
| 35 | + it_behaves_like Numeric, Integer do
|
| 36 | subject { Flores::Random.integer(range) }
|
| 37 | end
|
| 38 | end
|