1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/cmath.rb: fixed indent.

* lib/drb/ssl.rb: ditto.
* lib/irb/**/*.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-08-09 01:36:49 +00:00
parent 45592f4b4c
commit 8e5af8b628
32 changed files with 1363 additions and 1357 deletions

View file

@ -1,3 +1,9 @@
Sat Aug 9 10:35:30 2014 Laurent Arnoud <laurent@spkdev.net>
* lib/cmath.rb: fixed indent.
* lib/drb/ssl.rb: ditto.
* lib/irb/**/*.rb: ditto.
Sat Aug 9 10:28:03 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> Sat Aug 9 10:28:03 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* test/minitest/test_minitest_unit.rb: removed obsoleted condition * test/minitest/test_minitest_unit.rb: removed obsoleted condition

View file

@ -19,7 +19,7 @@ module IRB
include IrbLoader include IrbLoader
def execute(file_name, priv = nil) def execute(file_name, priv = nil)
# return ruby_load(file_name) unless IRB.conf[:USE_LOADER] # return ruby_load(file_name) unless IRB.conf[:USE_LOADER]
return irb_load(file_name, priv) return irb_load(file_name, priv)
end end
end end
@ -28,7 +28,7 @@ module IRB
include IrbLoader include IrbLoader
def execute(file_name) def execute(file_name)
# return ruby_require(file_name) unless IRB.conf[:USE_LOADER] # return ruby_require(file_name) unless IRB.conf[:USE_LOADER]
rex = Regexp.new("#{Regexp.quote(file_name)}(\.o|\.rb)?") rex = Regexp.new("#{Regexp.quote(file_name)}(\.o|\.rb)?")
return false if $".find{|f| f =~ rex} return false if $".find{|f| f =~ rex}

View file

@ -38,7 +38,7 @@ module IRB
CompletionProc = proc { |input| CompletionProc = proc { |input|
bind = IRB.conf[:MAIN_CONTEXT].workspace.binding bind = IRB.conf[:MAIN_CONTEXT].workspace.binding
# puts "input: #{input}" # puts "input: #{input}"
case input case input
when /^((["'`]).*\2)\.([^.]*)$/ when /^((["'`]).*\2)\.([^.]*)$/
@ -90,7 +90,7 @@ module IRB
candidates = Object.constants.collect{|m| m.to_s} candidates = Object.constants.collect{|m| m.to_s}
candidates.grep(/^#{receiver}/).collect{|e| "::" + e} candidates.grep(/^#{receiver}/).collect{|e| "::" + e}
# when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ # when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/
when /^([A-Z].*)::([^:.]*)$/ when /^([A-Z].*)::([^:.]*)$/
# Constant or class methods # Constant or class methods
receiver = $1 receiver = $1
@ -143,9 +143,9 @@ module IRB
regmessage = Regexp.new(Regexp.quote($1)) regmessage = Regexp.new(Regexp.quote($1))
candidates = global_variables.collect{|m| m.to_s}.grep(regmessage) candidates = global_variables.collect{|m| m.to_s}.grep(regmessage)
# when /^(\$?(\.?[^.]+)+)\.([^.]*)$/ # when /^(\$?(\.?[^.]+)+)\.([^.]*)$/
# when /^((\.?[^.]+)+)\.([^.]*)$/ # when /^((\.?[^.]+)+)\.([^.]*)$/
# when /^([^."].*)\.([^.]*)$/ # when /^([^."].*)\.([^.]*)$/
when /^([^."].*)(\.|::)([^.]*)$/ when /^([^."].*)(\.|::)([^.]*)$/
# variable.func or func.func # variable.func or func.func
receiver = $1 receiver = $1
@ -228,7 +228,7 @@ module IRB
end end
if Readline.respond_to?("basic_word_break_characters=") if Readline.respond_to?("basic_word_break_characters=")
# Readline.basic_word_break_characters= " \t\n\"\\'`><=;|&{(" # Readline.basic_word_break_characters= " \t\n\"\\'`><=;|&{("
Readline.basic_word_break_characters= " \t\n`><=;|&{(" Readline.basic_word_break_characters= " \t\n`><=;|&{("
end end
Readline.completion_append_character = nil Readline.completion_append_character = nil

View file

@ -30,7 +30,7 @@ module IRB
@workspace = WorkSpace.new @workspace = WorkSpace.new
end end
@thread = Thread.current if defined? Thread @thread = Thread.current if defined? Thread
# @irb_level = 0 # @irb_level = 0
# copy of default configuration # copy of default configuration
@ap_name = IRB.conf[:AP_NAME] @ap_name = IRB.conf[:AP_NAME]
@ -378,8 +378,8 @@ module IRB
def evaluate(line, line_no) # :nodoc: def evaluate(line, line_no) # :nodoc:
@line_no = line_no @line_no = line_no
set_last_value(@workspace.evaluate(self, line, irb_path, line_no)) set_last_value(@workspace.evaluate(self, line, irb_path, line_no))
# @workspace.evaluate("_ = IRB.conf[:MAIN_CONTEXT]._") # @workspace.evaluate("_ = IRB.conf[:MAIN_CONTEXT]._")
# @_ = @workspace.evaluate(line, irb_path, line_no) # @_ = @workspace.evaluate(line, irb_path, line_no)
end end
def inspect_last_value # :nodoc: def inspect_last_value # :nodoc:

View file

@ -21,7 +21,7 @@ module IRB # :nodoc:
def set_last_value(value) def set_last_value(value)
_set_last_value(value) _set_last_value(value)
# @workspace.evaluate self, "_ = IRB.CurrentContext.last_value" # @workspace.evaluate self, "_ = IRB.CurrentContext.last_value"
if @eval_history #and !@eval_history_values.equal?(llv) if @eval_history #and !@eval_history_values.equal?(llv)
@eval_history_values.push @line_no, @last_value @eval_history_values.push @line_no, @last_value
@workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}" @workspace.evaluate self, "__ = IRB.CurrentContext.instance_eval{@eval_history_values}"

View file

@ -82,7 +82,7 @@ module IRB # :nodoc:
irb.suspend_input_method(FileInputMethod.new(path)) do irb.suspend_input_method(FileInputMethod.new(path)) do
|back_io| |back_io|
irb.signal_status(:IN_LOAD) do irb.signal_status(:IN_LOAD) do
# p irb.conf # p irb.conf
if back_io.kind_of?(FileInputMethod) if back_io.kind_of?(FileInputMethod)
irb.eval_input irb.eval_input
else else

View file

@ -49,28 +49,28 @@ module IRB # :nodoc:
[:irb_print_working_workspace, OVERRIDE_ALL], [:irb_print_working_workspace, OVERRIDE_ALL],
[:irb_cwws, OVERRIDE_ALL], [:irb_cwws, OVERRIDE_ALL],
[:irb_pwws, OVERRIDE_ALL], [:irb_pwws, OVERRIDE_ALL],
# [:irb_cww, OVERRIDE_ALL], # [:irb_cww, OVERRIDE_ALL],
# [:irb_pww, OVERRIDE_ALL], # [:irb_pww, OVERRIDE_ALL],
[:cwws, NO_OVERRIDE], [:cwws, NO_OVERRIDE],
[:pwws, NO_OVERRIDE], [:pwws, NO_OVERRIDE],
# [:cww, NO_OVERRIDE], # [:cww, NO_OVERRIDE],
# [:pww, NO_OVERRIDE], # [:pww, NO_OVERRIDE],
[:irb_current_working_binding, OVERRIDE_ALL], [:irb_current_working_binding, OVERRIDE_ALL],
[:irb_print_working_binding, OVERRIDE_ALL], [:irb_print_working_binding, OVERRIDE_ALL],
[:irb_cwb, OVERRIDE_ALL], [:irb_cwb, OVERRIDE_ALL],
[:irb_pwb, OVERRIDE_ALL], [:irb_pwb, OVERRIDE_ALL],
# [:cwb, NO_OVERRIDE], # [:cwb, NO_OVERRIDE],
# [:pwb, NO_OVERRIDE] # [:pwb, NO_OVERRIDE]
], ],
[:irb_change_workspace, :ChangeWorkspace, "irb/cmd/chws", [:irb_change_workspace, :ChangeWorkspace, "irb/cmd/chws",
[:irb_chws, OVERRIDE_ALL], [:irb_chws, OVERRIDE_ALL],
# [:irb_chw, OVERRIDE_ALL], # [:irb_chw, OVERRIDE_ALL],
[:irb_cws, OVERRIDE_ALL], [:irb_cws, OVERRIDE_ALL],
# [:irb_cw, OVERRIDE_ALL], # [:irb_cw, OVERRIDE_ALL],
[:chws, NO_OVERRIDE], [:chws, NO_OVERRIDE],
# [:chw, NO_OVERRIDE], # [:chw, NO_OVERRIDE],
[:cws, NO_OVERRIDE], [:cws, NO_OVERRIDE],
# [:cw, NO_OVERRIDE], # [:cw, NO_OVERRIDE],
[:irb_change_binding, OVERRIDE_ALL], [:irb_change_binding, OVERRIDE_ALL],
[:irb_cb, OVERRIDE_ALL], [:irb_cb, OVERRIDE_ALL],
[:cb, NO_OVERRIDE]], [:cb, NO_OVERRIDE]],
@ -81,17 +81,17 @@ module IRB # :nodoc:
[:bindings, NO_OVERRIDE]], [:bindings, NO_OVERRIDE]],
[:irb_push_workspace, :PushWorkspace, "irb/cmd/pushws", [:irb_push_workspace, :PushWorkspace, "irb/cmd/pushws",
[:irb_pushws, OVERRIDE_ALL], [:irb_pushws, OVERRIDE_ALL],
# [:irb_pushw, OVERRIDE_ALL], # [:irb_pushw, OVERRIDE_ALL],
[:pushws, NO_OVERRIDE], [:pushws, NO_OVERRIDE],
# [:pushw, NO_OVERRIDE], # [:pushw, NO_OVERRIDE],
[:irb_push_binding, OVERRIDE_ALL], [:irb_push_binding, OVERRIDE_ALL],
[:irb_pushb, OVERRIDE_ALL], [:irb_pushb, OVERRIDE_ALL],
[:pushb, NO_OVERRIDE]], [:pushb, NO_OVERRIDE]],
[:irb_pop_workspace, :PopWorkspace, "irb/cmd/pushws", [:irb_pop_workspace, :PopWorkspace, "irb/cmd/pushws",
[:irb_popws, OVERRIDE_ALL], [:irb_popws, OVERRIDE_ALL],
# [:irb_popw, OVERRIDE_ALL], # [:irb_popw, OVERRIDE_ALL],
[:popws, NO_OVERRIDE], [:popws, NO_OVERRIDE],
# [:popw, NO_OVERRIDE], # [:popw, NO_OVERRIDE],
[:irb_pop_binding, OVERRIDE_ALL], [:irb_pop_binding, OVERRIDE_ALL],
[:irb_popb, OVERRIDE_ALL], [:irb_popb, OVERRIDE_ALL],
[:popb, NO_OVERRIDE]], [:popb, NO_OVERRIDE]],

View file

@ -88,7 +88,7 @@ module IRB # :nodoc:
}, },
:INF_RUBY => { :INF_RUBY => {
:PROMPT_I => "%N(%m):%03n:%i> ", :PROMPT_I => "%N(%m):%03n:%i> ",
# :PROMPT_N => "%N(%m):%03n:%i> ", # :PROMPT_N => "%N(%m):%03n:%i> ",
:PROMPT_N => nil, :PROMPT_N => nil,
:PROMPT_S => nil, :PROMPT_S => nil,
:PROMPT_C => nil, :PROMPT_C => nil,

View file

@ -842,7 +842,7 @@ class RubyLex
@indent += 1 @indent += 1
@indent_stack.push token_c @indent_stack.push token_c
end end
# p @indent_stack # p @indent_stack
end end
elsif DEINDENT_CLAUSE.include?(token) elsif DEINDENT_CLAUSE.include?(token)