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
# 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)
$0 = File::basename(ap_path, ".rb") if ap_path
@ -85,7 +84,6 @@ module IRB
#
# irb interpriter main routine
# (JP: irb$B%$%s%?%W%j%?K\BN(B)
#
class Irb
def initialize(workspace = nil, input_method = nil)
@ -218,9 +216,9 @@ module IRB
when :IN_LOAD
IRB.irb_abort(self, LoadAbort)
when :IN_IRB
# ignore (JP: $B2?$b$7$J$$(B.)
# ignore
else
# ignore (JP: $B$=$NB>$N>l9g$b2?$b$7$J$$(B.)
# ignore other cases as well
end
end

View file

@ -28,7 +28,6 @@ module IRB
@irb_level = 0
# 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]
@rc = IRB.conf[:RC]
@load_modules = IRB.conf[:LOAD_MODULES]

View file

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

View file

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

View file

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

View file

@ -12,7 +12,7 @@
require "e2mmap"
module IRB
# exceptions (JP: $BNc30Dj5A(B)
# exceptions
extend Exception2MessageMapper
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'

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$
# $Revision$
# $Date$
@ -14,7 +14,6 @@ require "thread"
module IRB
# job management class
# (JP: job$B4IM}%/%i%9(B)
class JobManager
@RCS_ID='-$Id$-'
@ -142,7 +141,6 @@ module IRB
end
# invoke multi-irb
# (JP: irb$B5/F0(B)
def IRB.irb(file = nil, *main)
workspace = WorkSpace.new(*main)
parent_thread = Thread.current

View file

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

View file

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

View file

@ -12,8 +12,8 @@
module IRB
class 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,
# TOPLEVEL_BINDING$B$N(Bmain$B$r$=$N$^$^;H$&(B. )
# set self to main if specified, otherwise inherit main
# from TOPLEVEL_BINDING.
def initialize(*main)
if IRB.conf[:SINGLE_IRB]
@binding = TOPLEVEL_BINDING