1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/lib/pry
Kyrylo Silin e6ac84e99c control_d_handler: don't mutate eval_string within the handler
This is a preparational step for #1824
(Enabling `# frozen_string_literal: true` in `~/.pryc` crashes most operations)

Alternative to https://github.com/pry/pry/pull/2030
(config: delete the `control_d_handler` option)

We had to jump a few hoops to change how the handler works. The problem is that
mutation is the default expected behaviour. Therefore, we had to change its
API. There's no need to pass `eval_string` because `pry_instance` already has it
as an attribute.

`config.control_d_handler` is a proxy proc, to preserve backwards compatibility
with users of old signature (one known user is Pry Byebug). The handler will
emit a warning if the old signature is used.
2019-05-04 23:17:59 +03:00
..
code Stop requiring coderay in files that don't use it 2019-03-28 02:38:21 +02:00
commands commands/show_info: fix formatting error for C method header 2019-05-02 23:38:30 +03:00
config Refactor Config 2019-05-02 00:10:37 +03:00
helpers helpers/command_helpers: add tests, refactor variable names 2019-03-30 20:53:06 +02:00
method rubocop: fix the Naming/AccessorMethodName cop 2019-03-24 18:49:37 +02:00
slop rubocop: disable Style/DoubleNegation 2019-03-23 20:03:52 +02:00
testable rubocop: fix the Naming/UncommunicativeMethodParamName cop 2019-03-24 18:06:30 +02:00
wrapped_module rubocop: fix Naming/MemoizedInstanceVariableName offences 2019-03-24 15:14:20 +02:00
basic_object.rb rubocop: fix offences of the Style/ClassAndModuleChildren cop 2019-02-27 02:23:52 +02:00
block_command.rb command: rename #correct_arg_arity to #normalize_method_args 2019-04-08 00:49:39 +03:00
class_command.rb command: rename #correct_arg_arity to #normalize_method_args 2019-04-08 00:49:39 +03:00
cli.rb rubocop: "fix" offences of the Security/Eval cop 2019-03-24 15:12:29 +02:00
code.rb Stop requiring coderay in files that don't use it 2019-03-28 02:38:21 +02:00
code_object.rb rubocop: fix offences of the Style/GuardClause cop 2019-03-23 02:37:09 +02:00
color_printer.rb config: factor out color printer proc to ColorPrinter 2019-04-14 15:46:04 +03:00
command.rb Add Pry::Warning 2019-05-04 17:42:02 +03:00
command_set.rb command_set: refactor specs 2019-04-04 02:46:45 +03:00
command_state.rb pry_instance: factor out command state to be global 2019-04-29 20:06:51 +03:00
config.rb control_d_handler: don't mutate eval_string within the handler 2019-05-04 23:17:59 +03:00
control_d_handler.rb control_d_handler: don't mutate eval_string within the handler 2019-05-04 23:17:59 +03:00
core_extensions.rb rubocop: fix Naming/HeredocDelimiterNaming cop 2019-03-24 15:36:06 +02:00
editor.rb Move default_editor_for_platform to Pry::Editor 2019-04-10 02:18:59 +03:00
exception_handler.rb config: factor out exception_handler hook to a separate class 2019-04-15 00:08:24 +03:00
exceptions.rb rubocop: fix offences of the Style/CaseEquality cop 2019-03-24 14:30:00 +02:00
forwardable.rb rubocop: fix offences of the Style/AccessModifierDeclarations cop 2019-03-23 20:18:02 +02:00
helpers.rb Deprecate Pry::Platform and introduce Pry::Helpers::Platform 2018-11-02 01:52:09 +08:00
history.rb history: cache @history.count to improve performance 2019-05-02 02:54:12 +03:00
hooks.rb config: factor out default hook definition to Pry::Hooks 2019-04-14 13:27:25 +03:00
indent.rb Stop requiring coderay in files that don't use it 2019-03-28 02:38:21 +02:00
input_completer.rb rubocop: fix the Naming/ConstantName cop 2019-03-24 18:17:18 +02:00
input_lock.rb rubocop: fix offences of the Performance/RedundantBlockCall cop 2019-02-27 00:46:11 +02:00
inspector.rb Reduce the influence of Pry::Config 2019-04-30 01:28:28 +03:00
last_exception.rb rubocop: fix the Naming/UncommunicativeMethodParamName cop 2019-03-24 18:06:30 +02:00
method.rb commands/show_info: fix formatting error for C method header 2019-05-02 23:38:30 +03:00
object_path.rb Require files from pry.rb; deps from each file that uses them 2019-03-10 13:20:03 +02:00
output.rb rubocop: fix the Naming/UncommunicativeMethodParamName cop 2019-03-24 18:06:30 +02:00
pager.rb Rename '_pry_' to 'pry_instance' 2019-03-23 00:54:39 +02:00
plugins.rb Reduce the influence of Pry::Config 2019-04-30 01:28:28 +03:00
prompt.rb Add Pry::Warning 2019-05-04 17:42:02 +03:00
pry_class.rb config: add rc_file that allows specifying pryrc file 2019-05-03 02:32:29 +03:00
pry_instance.rb control_d_handler: don't mutate eval_string within the handler 2019-05-04 23:17:59 +03:00
repl.rb rubocop: fix offences of the Style/CaseEquality cop 2019-03-24 14:30:00 +02:00
repl_file_loader.rb rubocop: fix offences of the Lint/UnderscorePrefixedVariableName cop 2019-03-23 12:18:50 +02:00
ring.rb ring: fix swap parts of array in to_a and index access 2018-11-26 08:46:09 +09:00
slop.rb rubocop: fix offences of the Style/GuardClause cop 2019-03-23 02:37:09 +02:00
syntax_highlighter.rb Factor out all CodeRay code to Pry::SyntaxHighlighter 2019-03-28 02:13:24 +02:00
system_command_handler.rb config: factor out 'system' to SystemCommandHandler 2019-04-15 02:36:01 +03:00
terminal.rb rubocop: fix offences of the Style/AsciiComments cop 2019-03-23 20:11:19 +02:00
testable.rb Refactor Config 2019-05-02 00:10:37 +03:00
version.rb Release v0.12.2 2018-11-16 04:05:09 +08:00
warning.rb warning: print file and line of the calling frame 2019-05-04 20:19:51 +03:00
wrapped_module.rb rubocop: fix offences of the Style/CaseEquality cop 2019-03-24 14:30:00 +02:00