Auto indent in IRB is enabled by default

This commit is contained in:
aycabta 2019-07-15 01:07:37 +09:00
Родитель 82b058ff60
Коммит 6d57369105
3 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -110,9 +110,9 @@ require "irb/version"
# #
# === Auto indentation # === Auto indentation
# #
# To enable auto-indent mode in irb, add the following to your +.irbrc+: # To disable auto-indent mode in irb, add the following to your +.irbrc+:
# #
# IRB.conf[:AUTO_INDENT] = true # IRB.conf[:AUTO_INDENT] = false
# #
# === Autocompletion # === Autocompletion
# #
@ -141,7 +141,7 @@ require "irb/version"
# This example can be used in your +.irbrc+ # This example can be used in your +.irbrc+
# #
# IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode # IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode
# :AUTO_INDENT => true, # enables auto-indent mode # :AUTO_INDENT => false, # disables auto-indent mode
# :PROMPT_I => ">> ", # simple prompt # :PROMPT_I => ">> ", # simple prompt
# :PROMPT_S => nil, # prompt for continuated strings # :PROMPT_S => nil, # prompt for continuated strings
# :PROMPT_C => nil, # prompt for continuated statement # :PROMPT_C => nil, # prompt for continuated statement

Просмотреть файл

@ -194,17 +194,17 @@ module IRB
# Can be either the default <code>IRB.conf[:AUTO_INDENT]</code>, or the # Can be either the default <code>IRB.conf[:AUTO_INDENT]</code>, or the
# mode set by #prompt_mode= # mode set by #prompt_mode=
# #
# To enable auto-indentation in irb: # To disable auto-indentation in irb:
# #
# IRB.conf[:AUTO_INDENT] = true # IRB.conf[:AUTO_INDENT] = false
# #
# or # or
# #
# irb_context.auto_indent_mode = true # irb_context.auto_indent_mode = false
# #
# or # or
# #
# IRB.CurrentContext.auto_indent_mode = true # IRB.CurrentContext.auto_indent_mode = false
# #
# See IRB@Configuration for more information. # See IRB@Configuration for more information.
attr_accessor :auto_indent_mode attr_accessor :auto_indent_mode

Просмотреть файл

@ -105,7 +105,7 @@ module IRB # :nodoc:
} }
@CONF[:PROMPT_MODE] = (STDIN.tty? ? :DEFAULT : :NULL) @CONF[:PROMPT_MODE] = (STDIN.tty? ? :DEFAULT : :NULL)
@CONF[:AUTO_INDENT] = false @CONF[:AUTO_INDENT] = true
@CONF[:CONTEXT_MODE] = 3 # use binding in function on TOPLEVEL_BINDING @CONF[:CONTEXT_MODE] = 3 # use binding in function on TOPLEVEL_BINDING
@CONF[:SINGLE_IRB] = false @CONF[:SINGLE_IRB] = false