ruby3-backward-compatibility 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/README.md +13 -1
- data/lib/ruby3_backward_compatibility/compatibility/all.rb +1 -0
- data/lib/ruby3_backward_compatibility/compatibility/bignum.rb +3 -0
- data/lib/ruby3_backward_compatibility/compatibility/object.rb +8 -0
- data/lib/ruby3_backward_compatibility/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0c323ac574c6b433d0eac9e328e4c286d81989e8d67af95c25a4e1ced4c6338
|
4
|
+
data.tar.gz: 89700cd3b7c1ddb64ed40f08373c2eae8f5b01ff53d46c0d34521c60ff43c750
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4590a47decacbc6d2c48ec5126052e5c30a86f3daf7a530bab8a02f2858c8ab86d77f828caa3f7b39c8e7f79c25e254ad819914a22f2f8f1755edeab24a2bc93
|
7
|
+
data.tar.gz: 5342b195f9c8ad5185c18569a7622c0e6c5f519d8b5538e2fc8c82c981f9245d6bc2adf3b6a5b6e79a4c4cef1078836056a960e4e396b4e53dd85180d5560182
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [1.5.0] - 2025-04-25
|
4
|
+
|
5
|
+
- Added back `Bignum` as an alias for `Integer`.
|
6
|
+
|
7
|
+
## [1.4.0] - 2024-05-02
|
8
|
+
|
9
|
+
- Ruby 3.2+: Add back `Object#=~`
|
10
|
+
|
3
11
|
## [1.3.0] - 2024-04-16
|
4
12
|
|
5
13
|
- Ruby 3.2+: Add back third argument to Regexp.new, to allow passing "n" to set `Regexp::NOENCODING`.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -81,6 +81,16 @@ To add `Dir.exists?` as an alias for `Dir.exist?`, use
|
|
81
81
|
require 'ruby3_backward_compatibility/compatibility/dir'
|
82
82
|
```
|
83
83
|
|
84
|
+
### Bignum
|
85
|
+
|
86
|
+
`Bignum` has been an alias for `Integer` for a while, but was removed.
|
87
|
+
|
88
|
+
To add back `Bignum` as an alias for `Integer`, use
|
89
|
+
|
90
|
+
```
|
91
|
+
require 'ruby3_backward_compatibility/compatibility/bignum'
|
92
|
+
```
|
93
|
+
|
84
94
|
### ERB
|
85
95
|
|
86
96
|
`ERB.new` used to have the signature
|
@@ -136,7 +146,9 @@ require 'ruby3_backward_compatibility/compatibility/i18n'
|
|
136
146
|
|
137
147
|
The methods `Object#taint` and `Object#untaint` were no-ops for a while but started to raise deprecation warnings.
|
138
148
|
|
139
|
-
|
149
|
+
The method `Object#=~` always returned `nil` if called on anything else than a String. It was removed in Ruby 3.2.
|
150
|
+
|
151
|
+
To add back `Object#taint` and `Object#untaint` as no-ops and `Object#=~` on arbitrary receivers, use
|
140
152
|
|
141
153
|
```
|
142
154
|
require 'ruby3_backward_compatibility/compatibility/object'
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'ruby3_backward_compatibility'
|
2
2
|
|
3
3
|
require 'ruby3_backward_compatibility/compatibility/dir'
|
4
|
+
require 'ruby3_backward_compatibility/compatibility/bignum'
|
4
5
|
require 'ruby3_backward_compatibility/compatibility/erb' if defined?(ERB)
|
5
6
|
require 'ruby3_backward_compatibility/compatibility/file'
|
6
7
|
require 'ruby3_backward_compatibility/compatibility/fixnum'
|
@@ -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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description:
|
27
|
+
description:
|
28
28
|
email:
|
29
29
|
- tobias.kraze@makandra.de
|
30
30
|
executables: []
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- lib/ruby3_backward_compatibility.rb
|
46
46
|
- lib/ruby3_backward_compatibility/callable_with_hash.rb
|
47
47
|
- lib/ruby3_backward_compatibility/compatibility/all.rb
|
48
|
+
- lib/ruby3_backward_compatibility/compatibility/bignum.rb
|
48
49
|
- lib/ruby3_backward_compatibility/compatibility/dir.rb
|
49
50
|
- lib/ruby3_backward_compatibility/compatibility/erb.rb
|
50
51
|
- lib/ruby3_backward_compatibility/compatibility/file.rb
|
@@ -64,7 +65,7 @@ metadata:
|
|
64
65
|
homepage_uri: https://github.com/makandra/ruby3-backward-compatibility
|
65
66
|
source_code_uri: https://github.com/makandra/ruby3-backward-compatibility
|
66
67
|
changelog_uri: https://github.com/makandra/ruby3-backward-compatibility/blob/main/CHANGELOG.md
|
67
|
-
post_install_message:
|
68
|
+
post_install_message:
|
68
69
|
rdoc_options: []
|
69
70
|
require_paths:
|
70
71
|
- lib
|
@@ -79,8 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
80
|
- !ruby/object:Gem::Version
|
80
81
|
version: '0'
|
81
82
|
requirements: []
|
82
|
-
rubygems_version: 3.
|
83
|
-
signing_key:
|
83
|
+
rubygems_version: 3.4.10
|
84
|
+
signing_key:
|
84
85
|
specification_version: 4
|
85
86
|
summary: Backward compatibility for Ruby 3 stdlib
|
86
87
|
test_files: []
|