ruby3-backward-compatibility 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/lib/ruby3_backward_compatibility/compatibility/object.rb +8 -0
- data/lib/ruby3_backward_compatibility/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09b06d532203cd4e5f4f81dbf7b664fafc62b02700594adc99f6dce8d4fe9449'
|
4
|
+
data.tar.gz: f691d1e175588417c95978937bf16d7f8bd2ab42ddfa7b9a14ed5b7ad270e1e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8863c4305734ac08069902668e536cf165e2e2bbd9dad261ebbc3cdad46d1d73cb366d1e8452578efd82b32efd6e645d5f46dff5f466500f9ac58747cbeaa7f
|
7
|
+
data.tar.gz: 614dbb8dedf50e9999e930576c2874bf11d5691bab6ca50fa63bbf83843f6ca11609b646dd34190242a52294bf4b59b2807faf2e4c378d6fc3729a4f46229cea
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -136,7 +136,9 @@ require 'ruby3_backward_compatibility/compatibility/i18n'
|
|
136
136
|
|
137
137
|
The methods `Object#taint` and `Object#untaint` were no-ops for a while but started to raise deprecation warnings.
|
138
138
|
|
139
|
-
|
139
|
+
The method `Object#=~` always returned `nil` if called on anything else than a String. It was removed in Ruby 3.2.
|
140
|
+
|
141
|
+
To add back `Object#taint` and `Object#untaint` as no-ops and `Object#=~` on arbitrary receivers, use
|
140
142
|
|
141
143
|
```
|
142
144
|
require 'ruby3_backward_compatibility/compatibility/object'
|
@@ -8,6 +8,14 @@ module Ruby3BackwardCompatibility
|
|
8
8
|
def untaint
|
9
9
|
self
|
10
10
|
end
|
11
|
+
|
12
|
+
# Make the match operator work on arbitrary receivers again.
|
13
|
+
def =~(regexp)
|
14
|
+
if Warning[:deprecated]
|
15
|
+
Warning.warn("deprecated Object#=~ is called on #{self.class}; it always returns nil")
|
16
|
+
end
|
17
|
+
nil
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
13
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby3-backward-compatibility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|