README.md in ruby3-backward-compatibility-1.1.1 vs README.md in ruby3-backward-compatibility-1.2.0
- old
+ new
@@ -69,10 +69,20 @@
This will wrap the given method and convert a hash given as the last argument into keywords, similar to how it worked in Ruby 2.
*Note:* In case the method is also defined in a prepended module, you need to put the `extend Ruby3BackwardCompatibility::CallableWithHash` above the `prepend`.
+### Dir
+
+`Dir.exists?` has been removed in favor of `Dir.exist?`.
+
+To add `Dir.exists?` as an alias for `Dir.exist?`, use
+
+```
+require 'ruby3_backward_compatibility/compatibility/dir'
+```
+
### ERB
`ERB.new` used to have the signature
```
@@ -89,11 +99,30 @@
```
require 'ruby3_backward_compatibility/compatibility/erb'
```
+### File
+`File.exists?` has been removed in favor of `File.exist?`.
+
+To add `File.exists?` as an alias for `File.exist?`, use
+
+```
+require 'ruby3_backward_compatibility/compatibility/file'
+```
+
+### Fixnum
+
+`Fixnum` has been an alias for `Integer` for a while, but was removed.
+
+To add back `Fixnum` as an alias for `Integer`, use
+
+```
+require 'ruby3_backward_compatibility/compatibility/fixnum'
+```
+
### I18n
`I18n` has a few methods (`translate`, `localize`, etc.) that requires to be called with keywords.
To allow calling it with option hashes, too, use
@@ -128,16 +157,16 @@
```
Psych.safe_load(yaml, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil)
```
-To alias `Psych.unsafe_load` as `Psych.load`, and to allow both styles of calling `Psych.safe_load`, use
+To allow both styles of calling `Psych.safe_load`, use
```
require 'ruby3_backward_compatibility/compatibility/psych'
```
-**Attention:** There has been a very good reason why Psych renamed the `.load` method: You may never use `.load` on any external strings. It is possible to create valid YAML strings that lead to the execution of arbitrary code, so calling `YAML.load` on user input is a major security vulnerability.
+**Attention:** There has been a very good reason why Psych renamed the `.load` method: You may never use `.load` on any external strings. It is possible to create valid YAML strings that lead to the execution of arbitrary code, so calling `YAML.load` on user input is a major security vulnerability. For that reason, this library does not change the safe behavior of `YAML.load`.
### String
`String#encode` require keyword arguments. To allow it to be called with an options hash, use