diff options
| author | Rune Philosof <rune.git@philosof.dk> | 2025-10-28 13:55:59 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-12-04 00:40:11 +0000 |
| commit | 8f7d821dbae8bba00e1e905bbda1b639998288aa (patch) | |
| tree | 8fae61279e9040f076fe6efa876ac16648b803fe | |
| parent | e96bbd718e4aef81c749080016a44364a2b8e8c9 (diff) | |
[ruby/psych] Remove y Object extension in IRB
Fixes: ruby#685
This feature can easily break how you use other gems like factory_bot or prawn.
https://github.com/ruby/psych/pull/747#issuecomment-3413139525
> But I kind of think we should leave `psych/y` around. If people really want to use it they could require the file.
If you miss the function in Kernel, you can require it interactively or add it to `.irbrc`:
```ruby
require 'psych/y'
```
https://github.com/ruby/psych/commit/f1610b3f05
| -rw-r--r-- | ext/psych/lib/psych/core_ext.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/psych/lib/psych/core_ext.rb b/ext/psych/lib/psych/core_ext.rb index 78fe262239..6dfd0f1696 100644 --- a/ext/psych/lib/psych/core_ext.rb +++ b/ext/psych/lib/psych/core_ext.rb @@ -14,10 +14,6 @@ class Object end end -if defined?(::IRB) - require_relative 'y' -end - # Up to Ruby 3.4, Set was a regular object and was dumped as such # by Pysch. # Starting from Ruby 4.0 it's a core class written in C, so we have to implement |
