Skip to content

Commit

Permalink
Change verbosity to avoid Ruby 2.7's ivar warning
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Feb 1, 2024
1 parent 91f1ea6 commit 608f07f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/irb/extend-command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ def self.extend_object(obj)
def self.install_helper_methods
HelperMethod.helper_methods.each do |name, helper_method_class|
define_method name do |*args, **opts, &block|
verbose, $VERBOSE = $VERBOSE, nil
helper_ivar = "@_helper_method_#{name}".to_sym
helper = instance_variable_get(helper_ivar)

Expand All @@ -311,6 +312,8 @@ def self.install_helper_methods
end

helper.execute(*args, **opts, &block)
ensure
$VERBOSE = verbose
end
end
end
Expand Down

0 comments on commit 608f07f

Please sign in to comment.