diff options
author | Stan Lo <[email protected]> | 2023-08-23 16:37:16 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-08-29 18:15:05 +0900 |
commit | 221c2d0e19171f059461f8a8c3489cd9578ed43e (patch) | |
tree | e102feefd56c789c5e1b1505181db30d106fd2d9 /lib/irb/context.rb | |
parent | 0cd92819c933ac3aea8eb173986b6478fcd1fbfe (diff) |
[ruby/irb] Print deprecation message for prompt_n methods
(https://github.com/ruby/irb/pull/691)
They were removed in #685, but we should still keep them to avoid breaking
changes to tools like Chef.
https://github.com/chef/chef/blob/533ff089479763f29045e4e6ddf388b73fc99338/lib/chef/shell.rb#L138
https://github.com/ruby/irb/commit/b585e0c835
Diffstat (limited to 'lib/irb/context.rb')
-rw-r--r-- | lib/irb/context.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 6d6261e60b..a20510d73c 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -229,6 +229,19 @@ module IRB # # See IRB@Customizing+the+IRB+Prompt for more information. attr_accessor :prompt_c + + # TODO: Remove this when developing v2.0 + def prompt_n + warn "IRB::Context#prompt_n is deprecated and will be removed in the next major release." + "" + end + + # TODO: Remove this when developing v2.0 + def prompt_n=(_) + warn "IRB::Context#prompt_n= is deprecated and will be removed in the next major release." + "" + end + # Can be either the default <code>IRB.conf[:AUTO_INDENT]</code>, or the # mode set by #prompt_mode= # |