mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
do not undef =~ unless defined (#2149)
Undefining a nonexistent definition is an error in Ruby. This has not been a problem because there always was `Object#=~` predefined. But we are planning to delete that useless method. This would become an error unless properly guarded.
This commit is contained in:
parent
9d9ae4a0b0
commit
b548784b4a
1 changed files with 1 additions and 1 deletions
|
@ -339,7 +339,7 @@ class Pry
|
|||
super
|
||||
end
|
||||
end
|
||||
undef =~
|
||||
undef =~ if method_defined?(:=~)
|
||||
|
||||
# Check whether String responds to missing methods.
|
||||
def respond_to_missing?(method_name, include_private = false)
|
||||
|
|
Loading…
Add table
Reference in a new issue