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

Get rid of Japanese comments and fix English comments as appropriate.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2001-05-03 08:56:49 +00:00
parent f0448281f5
commit 94df732f8b
10 changed files with 13 additions and 33 deletions

View file

@ -44,7 +44,6 @@ module IRB
end end
# initialize IRB and start TOP_LEVEL irb # initialize IRB and start TOP_LEVEL irb
# (JP: IRB$B=i4|2=$H%H%C%W%l%Y%k(Birb$B5/F0(B)
def IRB.start(ap_path = nil) def IRB.start(ap_path = nil)
$0 = File::basename(ap_path, ".rb") if ap_path $0 = File::basename(ap_path, ".rb") if ap_path
@ -85,7 +84,6 @@ module IRB
# #
# irb interpriter main routine # irb interpriter main routine
# (JP: irb$B%$%s%?%W%j%?K\BN(B)
# #
class Irb class Irb
def initialize(workspace = nil, input_method = nil) def initialize(workspace = nil, input_method = nil)
@ -218,9 +216,9 @@ module IRB
when :IN_LOAD when :IN_LOAD
IRB.irb_abort(self, LoadAbort) IRB.irb_abort(self, LoadAbort)
when :IN_IRB when :IN_IRB
# ignore (JP: $B2?$b$7$J$$(B.) # ignore
else else
# ignore (JP: $B$=$NB>$N>l9g$b2?$b$7$J$$(B.) # ignore other cases as well
end end
end end

View file

@ -28,7 +28,6 @@ module IRB
@irb_level = 0 @irb_level = 0
# copy of default configuration # copy of default configuration
# (JP: $B%G%U%)%k%H%3%s%U%#%.%e%l!<%7%g%s$N%3%T!<(B)
@ap_name = IRB.conf[:AP_NAME] @ap_name = IRB.conf[:AP_NAME]
@rc = IRB.conf[:RC] @rc = IRB.conf[:RC]
@load_modules = IRB.conf[:LOAD_MODULES] @load_modules = IRB.conf[:LOAD_MODULES]

View file

@ -12,7 +12,6 @@
module IRB module IRB
# #
# IRB extended command # IRB extended command
# (JP: IRB$B3HD%%3%^%s%I(B)
# #
module ExtendCommand module ExtendCommand
# include Loader # include Loader

View file

@ -13,7 +13,6 @@
module IRB module IRB
# initialize config # initialize config
# (JP: config$B$N=i4|2=(B)
def IRB.initialize(ap_path) def IRB.initialize(ap_path)
IRB.init_config(ap_path) IRB.init_config(ap_path)
IRB.init_error IRB.init_error
@ -27,7 +26,6 @@ module IRB
@MATHN_INITIALIZED = false @MATHN_INITIALIZED = false
# default configurations # default configurations
# (JP: $B%G%U%)%k%H%3%s%U%#%.%e%l!<%7%g%s(B)
unless ap_path and @CONF[:AP_NAME] unless ap_path and @CONF[:AP_NAME]
ap_path = File.join(File.dirname(File.dirname(__FILE__)), "irb.rb") ap_path = File.join(File.dirname(File.dirname(__FILE__)), "irb.rb")
end end
@ -102,7 +100,6 @@ module IRB
end end
# option analyzing # option analyzing
# (JP: $B%*%W%7%g%s2r@O(B)
def IRB.parse_opts def IRB.parse_opts
while opt = ARGV.shift while opt = ARGV.shift
case opt case opt
@ -205,7 +202,6 @@ module IRB
end end
# initialize tracing function # initialize tracing function
# (JP: $B%H%l!<%5=i4|@_Dj(B)
def IRB.initialize_tracer def IRB.initialize_tracer
unless @TRACER_INITIALIZED unless @TRACER_INITIALIZED
require("tracer") require("tracer")
@ -219,7 +215,6 @@ module IRB
end end
# initialize mathn function # initialize mathn function
# (JP: mathn$B=i4|@_Dj(B)
def IRB.initialize_mathn def IRB.initialize_mathn
unless @MATHN_INITIALIZED unless @MATHN_INITIALIZED
require "mathn" require "mathn"
@ -228,7 +223,6 @@ module IRB
end end
# initialize loader function # initialize loader function
# (JP: loader$B=i4|@_Dj(B)
def IRB.initialize_loader def IRB.initialize_loader
unless @LOADER_INITIALIZED unless @LOADER_INITIALIZED
require "irb/loader" require "irb/loader"

View file

@ -13,7 +13,7 @@ require "e2mmap"
module IRB module IRB
# exceptions (JP: $BNc30Dj5A(B) # exceptions
extend Exception2MessageMapper extend Exception2MessageMapper
def_exception :UnrecognizedSwitch, "Unrecognized switch: %s" def_exception :UnrecognizedSwitch, "Unrecognized switch: %s"
def_exception :NotImplementError, "Need to define `%s'" def_exception :NotImplementError, "Need to define `%s'"

View file

@ -12,7 +12,7 @@
require "e2mmap" require "e2mmap"
module IRB module IRB
# exceptions (JP: $BNc30Dj5A(B) # exceptions
extend Exception2MessageMapper extend Exception2MessageMapper
def_exception :UnrecognizedSwitch, '$B%9%$%C%A(B(%s)$B$,J,$j$^$;$s(B' def_exception :UnrecognizedSwitch, '$B%9%$%C%A(B(%s)$B$,J,$j$^$;$s(B'
def_exception :NotImplementError, '`%s\'$B$NDj5A$,I,MW$G$9(B' def_exception :NotImplementError, '`%s\'$B$NDj5A$,I,MW$G$9(B'

View file

@ -1,5 +1,5 @@
# #
# irb/multi-irb.rb - multiple irb module(JP: $BJ#?t(Birb$BBP1~%b%8%e!<%k(B) # irb/multi-irb.rb - multiple irb module
# $Release Version: 0.7.3$ # $Release Version: 0.7.3$
# $Revision$ # $Revision$
# $Date$ # $Date$
@ -14,7 +14,6 @@ require "thread"
module IRB module IRB
# job management class # job management class
# (JP: job$B4IM}%/%i%9(B)
class JobManager class JobManager
@RCS_ID='-$Id$-' @RCS_ID='-$Id$-'
@ -142,7 +141,6 @@ module IRB
end end
# invoke multi-irb # invoke multi-irb
# (JP: irb$B5/F0(B)
def IRB.irb(file = nil, *main) def IRB.irb(file = nil, *main)
workspace = WorkSpace.new(*main) workspace = WorkSpace.new(*main)
parent_thread = Thread.current parent_thread = Thread.current

View file

@ -458,8 +458,7 @@ class RubyLex
ungetc ungetc
identify_number identify_number
else else
# for obj.if # for "obj.if" etc.
# (JP: obj.if $B$J$I$NBP1~(B)
@lex_state = EXPR_DOT @lex_state = EXPR_DOT
Token(TkDOT) Token(TkDOT)
end end
@ -693,7 +692,6 @@ class RubyLex
token.concat getc token.concat getc
end end
# almost fix token # almost fix token
# (JP: $BBgBN(Bfix token)
case token case token
when /^\$/ when /^\$/
@ -709,13 +707,11 @@ class RubyLex
token_c, *trans = TkReading2Token[token] token_c, *trans = TkReading2Token[token]
if token_c if token_c
# reserved word? # reserved word?
# (JP: $BM=Ls8l$+$I$&$+(B?)
if (@lex_state != EXPR_BEG && if (@lex_state != EXPR_BEG &&
@lex_state != EXPR_FNAME && @lex_state != EXPR_FNAME &&
trans[1]) trans[1])
# modifiers # modifiers
# (JP: $B=$>~;R(B)
token_c = TkSymbol2Token[trans[1]] token_c = TkSymbol2Token[trans[1]]
@lex_state = trans[0] @lex_state = trans[0]
else else
@ -960,7 +956,6 @@ class RubyLex
end end
else else
# other characters # other characters
#(JP:$B$=$NB>$NJ8;z(B)
end end
end end
end end

View file

@ -88,9 +88,8 @@ class SLex
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
class Node class Node
# if postproc no exist, this node is abstract node. # if postproc is nil, this node is an abstract node.
# if postproc isn't nil, this node is real node. # if postproc is non-nil, this node is a real node.
# (JP: postproc$B$,$J$1$l$PCj>]%N!<%I(B, nil$B$8$c$J$1$l$P6q>]%N!<%I(B)
def initialize(preproc = nil, postproc = nil) def initialize(preproc = nil, postproc = nil)
@Tree = {} @Tree = {}
@preproc = preproc @preproc = preproc
@ -159,11 +158,9 @@ class SLex
# #
# chrs: String # chrs: String
# character array (JP: $B0lJ8;z$E$D$N(BArray) # character array
# io It must have getc()/ungetc(), and ungetc() can be # io must have getc()/ungetc(); and ungetc() must be
# called any number of times. # able to be called arbitrary number of times.
# (JP:$B$@$@$7(B, getc/ungetc$B$,Hw$o$C$F$$$J$1$l$P$J$i$J$$(B.
# $B$5$i$K(B, ungetc$B$OJ#?t2s2DG=$G$J$/$F$O$J$i$J$$(B.)
# #
def match(chrs, op = "") def match(chrs, op = "")
print "match>: ", chrs, "op:", op, "\n" if SLex.debug? print "match>: ", chrs, "op:", op, "\n" if SLex.debug?

View file

@ -12,8 +12,8 @@
module IRB module IRB
class WorkSpace class WorkSpace
# create new workspace. # create new workspace.
# (JP: $B?7$?$J(Bworkspace$B$r:n$k(B. main$B$r(Bself$B$H$9$k(B. $B>JN,$7$?$i(B, # set self to main if specified, otherwise inherit main
# TOPLEVEL_BINDING$B$N(Bmain$B$r$=$N$^$^;H$&(B. ) # from TOPLEVEL_BINDING.
def initialize(*main) def initialize(*main)
if IRB.conf[:SINGLE_IRB] if IRB.conf[:SINGLE_IRB]
@binding = TOPLEVEL_BINDING @binding = TOPLEVEL_BINDING