pry/pry · error
_pry_ is deprecated, use pry_instance instead
Error message
_pry_ is deprecated, use pry_instance instead
What it means
Error "_pry_ is deprecated, use pry_instance instead" thrown in pry/pry.
Source
Thrown at lib/pry/command.rb:293
# run ".ls"
# @example
# run "amend-line", "5", 'puts "hello world"'
def run(command_string, *args)
command_string = pry_instance.config.command_prefix.to_s + command_string
complete_string = "#{command_string} #{args.join(' ')}".rstrip
command_set.process_line(complete_string, context)
end
def commands
command_set.to_hash
end
def void
VOID_VALUE
end
def _pry_
Pry::Warning.warn('_pry_ is deprecated, use pry_instance instead')
pry_instance
end
# @return [Object] The value of `self` inside the `target` binding.
def target_self
target.eval('self')
end
# @return [Hash] Pry commands can store arbitrary state
# here. This state persists between subsequent command invocations.
# All state saved here is unique to the command, it does not
# need to be namespaced.
# @example
# state.my_state = "my state" # this will not conflict with any
# # `state.my_state` used in another command.
def state
self.class.state
endView on GitHub (pinned to 1356402628)
When it happens
Trigger: Thrown at lib/pry/command.rb:293 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pry/pry@1356402628 (2026-08-21).
Data as JSON: /api/errors/bed03af2667cf71e.
Report an issue: GitHub.