# Setter of \$!

e\$B!!\$5\$5\$@\$G\$9!#e(B

e\$B\$K\$7\$?\$\$\$s\$G\$9\$,!“NI\$\$\$G\$7\$g\$&\$+!#e(B
e\$B=PMh\$J\$\$\$H:\$\$kNc\$H\$+\$C\$F\$I\$l\$/\$i\$\$\$”\$k\$G\$7\$g\$&\$+!#e(B

e\$B\$^\$D\$b\$He(B e\$B\$f\$-\$R\$m\$G\$9e(B

In message “Re: [ruby-dev:31473] setter of \$!”
on Sat, 18 Aug 2007 13:02:12 +0900, SASADA Koichi [email protected]
writes:

|e\$B=PMh\$J\$\$\$H:\$\$kNc\$H\$+\$C\$F\$I\$l\$/\$i\$\$\$”\$k\$G\$7\$g\$&\$+!#e(B

e\$B\$\$\$\$\$s\$8\$c\$J\$\$\$G\$7\$g\$&\$+!#e(B

e\$B\$^\$D\$b\$He(B e\$B\$f\$-\$R\$m\$G\$9e(B

In message “Re: [ruby-dev:31488] Re: setter of \$!”
on Sat, 18 Aug 2007 22:22:00 +0900, [email protected]
(e\$B@PDM7=<ye(B) writes:

|>e\$B=PMh\$J\$\$\$H:\$\$kNc\$H\$+\$C\$F\$I\$l\$/\$i\$\$\$”\$k\$G\$7\$g\$&\$+!#e(B
|
|e\$B;d\$N4X78\$G\$Oe(B, lib/e2mmap.rb e\$B\$He(B lib/irb.rb e\$B\$G;H\$C\$F\$\$\$^\$9e(B.
|
|e2mmap.rb e\$B\$G\$Oe(B, e\$B0J2<\$N\$h\$&\$J46\$8\$K;H\$C\$F\$\$\$^\$9e(B.
|
| def E2MM.Raise(klass = E2MM, err = nil, *rest)
| if form = e2mm_message(klass, err)
| \$! = err.new(sprintf(form, *rest))
| \$@ = caller(1) if [email protected]?
| [email protected] if \$@[0] =~ /^#{Regexp.quote(FILE)}
| raise
| else
| E2MM.Fail E2MM, ErrNotRegisteredException, err.inspect
| end
| end

e\$B\$3\$l\$Oe(Braisee\$B\$KBhe(B3e\$B0z?te(B(caller)e\$B\$rEO\$9\$3\$H\$GBP=h\$9\$Y\$-\$J\$s\$8\$c\$Je(B
e\$B\$\$\$+\$J\$"!"\$H;W\$\$\$^\$9!#e(B

e\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9e(B.

In [ruby-dev:31473] the message: “[ruby-dev:31473] setter of \$!”, on

e\$B!!\$5\$5\$@\$G\$9!#e(B

e\$B=PMh\$J\$\$\$H:\$\$kNc\$H\$+\$C\$F\$I\$l\$/\$i\$\$\$”\$k\$G\$7\$g\$&\$+!#e(B

e\$B;d\$N4X78\$G\$Oe(B, lib/e2mmap.rb e\$B\$He(B lib/irb.rb
e\$B\$G;H\$C\$F\$\$\$^\$9e(B.

e2mmap.rb e\$B\$G\$Oe(B, e\$B0J2<\$N\$h\$&\$J46\$8\$K;H\$C\$F\$\$\$^\$9e(B.

def E2MM.Raise(klass = E2MM, err = nil, *rest)
if form = e2mm_message(klass, err)
\$! = err.new(sprintf(form, *rest))
\$@ = caller(1) if [email protected]?
[email protected] if \$@[0] =~ /^#{Regexp.quote(FILE)}
raise
else
E2MM.Fail E2MM, ErrNotRegisteredException, err.inspect
end
end

e\$B2?\$G\$3\$&\$J\$C\$F\$\$\$k\$+\$H\$\$\$&\$He(B, \$! e\$B\$K@_Dj\$;\$:\$Ke(B

raise err.new(sprintf(form, *rest))

e\$B\$H\$9\$k\$He(B, \$@e\$B\$,:F@_Dj\$5\$l\$F\$7\$^\$&\$+\$i\$N\$h\$&\$J5\$\$,\$7\$^\$9e(B.
e\$BL5M}\$9\$l\$PBP=he(B
e\$B\$G\$-\$J\$\$\$G\$O\$J\$\$\$G\$9\$,e(B…

def E2MM.Raise(klass = E2MM, err = nil, *rest)
if form = e2mm_message(klass, err)
begin
raise err.new(sprintf(form, *rest))
resuce err
\$@ = caller(1) if [email protected]?
[email protected] if \$@[0] =~ /^#{Regexp.quote(FILE)}
raise
end
else
E2MM.Fail E2MM, ErrNotRegisteredException, err.inspect
end
end

e\$B\$+\$J\$!e(B… e\$B\$J\$s\$+e(B,
e\$B2?\$G\$3\$&\$J\$C\$F\$\$\$k\$N\$+J,\$+\$i\$J\$/\$J\$j\$=\$&\$G\$9\$,e(B…

lib/irb.rb e\$B\$G\$Oe(B

``````  @scanner.each_top_level_statement do |line, line_no|
``````

signal_status(:IN_EVAL) do
begin
line.untaint
@context.evaluate(line, line_no)
output_value if @context.echo?
rescue StandardError, ScriptError, Abort
\$! = RuntimeError.new(“unknown exception raised”) unless \$!
print \$!.class, ": ", \$!, “\n”

e\$B\$H8@\$&46\$8\$J\$s\$G\$9\$,e(B, \$!
e\$B\$,@_Dj\$5\$l\$F\$\$\$J\$\$Nc30\$N>l9g\$NBP=h\$J\$s\$G\$9\$,e(B,
e\$B\$3\$s\$J\$3\$H\$"\$jF@\$k\$N\$+\$J\$!e(B? e\$B\$C\$F5\$\$,\$7\$J\$\$\$G\$b\$J\$\$\$G\$9\$,e(B,
e\$B2a5n\$K\$O\$=\$&e(B
e\$B\$\$\$&\$3\$H\$,\$"\$C\$?\$N\$Ge(B,
e\$B\$3\$N\$h\$&\$J=hM}\$,F~\$C\$F\$\$\$k\$N\$G\$O\$J\$\$\$+\$H;W\$\$\$^\$9e(B.

e\$B\$^\$"e(B,
e\$B\$3\$C\$A\$bBeF~\$G\$-\$J\$/\$F\$b\$I\$&\$K\$+BP=h\$G\$-\$k\$H;W\$\$\$^\$9\$,e(B…

__
---------------------------------------------------->> e\$B@PDMe(B
e\$B7=<ye(B <<—
---------------------------------->> e-mail: [email protected] <<—

e\$B\$5\$H\$&\$U\$_\$d\$9e(B @ OSS e\$B%F%/%N%m%8\$G\$9!#e(B

At Sat, 18 Aug 2007 13:02:12 +0900,

e\$B=PMh\$J\$\$\$H:\$\$kNc\$H\$+\$C\$F\$I\$l\$/\$i\$\$\$”\$k\$G\$7\$g\$&\$+!#e(B

e\$B<BNc\$O;}\$C\$F\$\$\$J\$\$\$G\$9\$,!"e(BIO e\$B%b%8%e!<%k\$N%\$%s%?!<%U%’%\$%9\$re(B
e\$BLOJo\$7\$?\$je(B (StringIO e\$B\$N\$h\$&\$J\$b\$Ne(B)e\$B!“e(BIO
e\$B\$r%i%C%T%s%0e(B(?)
e\$B\$9\$k\$h\$&\$J\$b\$Ne(B (SSL e\$B\$r07\$&%b%8%e!<%k\$H\$+e(B) e\$B\$Ge(B \$!
e\$B\$r@_Dj\$7\$?\$\$e(B
e\$B>l9g\$,\$”\$k\$s\$8\$c\$J\$\$\$G\$7\$g\$&\$+!#e(B

Perl e\$B\$de(B C e\$B\$J\$i\$=\$&\$\$\$C\$?Nc\$O\$\$\$/\$D\$b\$"\$k\$s\$8\$c\$J\$\$\$+\$He(B
e\$B;W\$\$\$^\$9!#e(B(IO e\$B\$K8B\$i\$:e(B)e\$B!#e(BRuby
e\$B\$O:G6a;O\$a\$?\$P\$+\$j\$Ge(B
e\$B>\$7\$/\$J\$\$\$N\$G!“e(BRuby e\$B\$K\$b\$”\$F\$O\$^\$k\$+\$I\$&\$+\$O;d\$K\$Oe(B
e\$B\$o\$+\$j\$^\$;\$s\$,!#e(B:-X

e\$B!!\$5\$5\$@\$G\$9!#e(B

SATOH Fumiyasu wrote:

e\$B>\$7\$/\$J\$\$\$N\$G!“e(BRuby e\$B\$K\$b\$”\$F\$O\$^\$k\$+\$I\$&\$+\$O;d\$K\$Oe(B
e\$B\$o\$+\$j\$^\$;\$s\$,!#e(B:-X

e\$B!!;d\$Oe(B Perl e\$B!J\$de(B
Ce\$B!K\$rNI\$/CN\$i\$J\$\$\$N\$G!"6qBNE*\$K\$I\$s\$JOC\$+65\$(\$F\$b\$ie(B
e\$B\$(\$J\$\$\$G\$7\$g\$&\$+!#e(B

e\$B!!\$5\$5\$@\$G\$9!#e(B

e\$B!!e(Blib/test/unit/autorunner.rb e\$B\$G\$3\$s\$JNc\$r8+\$D\$1\$^\$7\$?!#e(B

``````  def process_args(args = ARGV)
begin
options.order!(args) {|arg| @to_run << arg}
rescue OptionParser::ParseError => e
puts e
puts options
\$! = nil
abort
else
@filters << proc{false} unless(@filters.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B\$,<:GT\$9\$kLdBj\$rD4::\$9\$k:]\$Ke(B
e\$B:.Mp\$N85\$K\$J\$k\$3\$H\$,\$”\$j\$^\$7\$?!#e(B(errno e\$B\$,e(B ldap_open(3)
e\$B\$Ne(B
e\$B<:GTM}M3\$r<(\$7\$F\$\$\$J\$\$\$N\$Ge(B)

e\$B\$3\$N:.Mp\$rHr\$1\$k\$?\$a\$Ke(B ldap_open(3) e\$B\$r8F\$VA0\$Ke(B
errno = 0 e\$B\$r<B9T\$9\$k\$h\$&\$K\$7\$^\$7\$?!#e(B

e\$B!De(B

lib/test/unit/autorunner.rb e\$B\$Ne(B process_args() e\$B\$N\$h\$&\$Ke(B
e\$B0U?^E*\$K%(%i!<>pJs\$r1#JC\$7\$?\$j\$9\$k\$3\$H\$b\$"\$ke(B
(e\$BL5;k\$7\$?\$\$!"I=<(\$7\$?\$/\$J\$\$>l9ge(B) e\$B\$G\$7\$g\$&\$7!"e(B
e\$BJL\$N%(%i!<\$K=q\$-49\$(\$?\$\$\$3\$H\$ODA\$7\$\$\$3\$H\$G\$Oe(B
e\$B\$J\$\$\$s\$8\$c\$J\$\$\$+\$H;W\$\$\$^\$9!#e(B

# Ruby e\$B\$Ge(B \$! e\$B\$r=q\$-49\$(\$i\$l\$kI,MW\$+\$I\$&\$+\$O\$5\$F\$*\$-e(B

e\$B\$1\$\$\$8\$e!w\$\$\$7\$D\$+\$G\$9e(B.

In [ruby-dev:31489] the message: “[ruby-dev:31489] Re: setter of \$!”,
on Aug/18 22:32(JST) Yukihiro M. writes:

e\$B\$^\$D\$b\$He(B e\$B\$f\$-\$R\$m\$G\$9e(B

|e2mmap.rb e\$B\$G\$Oe(B, e\$B0J2<\$N\$h\$&\$J46\$8\$K;H\$C\$F\$\$\$^\$9e(B.

e\$B\$3\$l\$Oe(Braisee\$B\$KBhe(B3e\$B0z?te(B(caller)e\$B\$rEO\$9\$3\$H\$GBP=h\$9\$Y\$-\$J\$s\$8\$c\$Je(B
e\$B\$\$\$+\$J\$"!"\$H;W\$\$\$^\$9!#e(B

e\$B\$*\$)e(B… e\$B\$\$\$D\$N\$^\$K\$+\$3\$s\$J\$b\$N\$,e(B… e\$B\$=\$l\$H\$be(B,
e\$B:G=i\$+\$i\$"\$C\$?\$N\$+\$J\$!e(B?

e\$B\$?\$7\$+\$Ke(B, e\$B\$3\$l\$r;H\$(\$P\$3\$N>l9ge(B \$!
e\$B\$KBeF~\$OI,MW\$J\$5\$=\$&e(B.

In [ruby-dev:31500] the message: “[ruby-dev:31500] Re: setter of \$!”,
on Aug/19 12:55(JST) SASADA Koichi writes:

e\$B!!\$5\$5\$@\$G\$9!#e(B
e\$B!!e(Blib/test/unit/autorunner.rb e\$B\$G\$3\$s\$JNc\$r8+\$D\$1\$^\$7\$?!#e(B
\$! = nil
e\$B!!\$J\$s\$Ge(B abort e\$B\$NA0\$Ge(B \$! e\$B\$re(B nil e\$B\$K\$7\$F\$s\$@\$m!#%(%i!<\$rI=<(\$7\$?\$/\$Je(B
e\$B\$+\$C\$?!)e(B

e\$B\$&!<\$`e(B…

\$! = Object.new

e\$B\$H\$+\$O%(%i!<\$K\$J\$j\$^\$9\$Me(B. e\$B\$H\$\$\$&\$3\$H\$Oe(B,
nile\$B\$rNc30\$K\$7\$?\$\$>l9g\$,\$"\$k\$se(B
e\$B\$G\$7\$g\$&\$+\$Me(B?

raise nil

e\$B\$H\$+e(B,

raise NilClass

e\$B\$H\$+\$O\$G\$-\$J\$\$\$N\$Ke(B…

__
---------------------------------------------------->> e\$B@PDMe(B
e\$B7=<ye(B <<—
---------------------------------->> e-mail: [email protected] <<—

e\$B\$J\$+\$@\$G\$9!#e(B

At Mon, 20 Aug 2007 16:54:36 +0900,
e\$B@PDM7=<ye(B wrote in [ruby-dev:31519]:

e\$B\$H\$+\$O%(%i!<\$K\$J\$j\$^\$9\$Me(B. e\$B\$H\$\$\$&\$3\$H\$Oe(B, nile\$B\$rNc30\$K\$7\$?\$\$>l9g\$,\$"\$k\$se(B
e\$B\$G\$7\$g\$&\$+\$Me(B?

e\$B%a%C%;!<%8\$r>C\$7\$?\$\$\$@\$1\$G\$7\$g\$&!#e(B

\$ ruby -v -e ‘\$!=RuntimeError.new; abort’
ruby 1.8.6 (2007-08-18 revision 13107) [i686-linux]
-e:1: RuntimeError (RuntimeError)

exit falsee\$B\$+e(Babort options.to_se\$B\$G\$\$\$\$\$H;W\$\$\$^\$9\$,!#e(B

e\$B\$J\$+\$@\$G\$9!#e(B

At Mon, 20 Aug 2007 16:27:20 +0900,
SATOH Fumiyasu wrote in [ruby-dev:31518]:

e\$B\$H\$\$\$&\$3\$H\$G!"C1\$Ke(B raise e\$B\$9\$l\$P<+F0E*\$Ke(B \$! e\$B\$,@_Dj\$5\$l\$k\$N\$G!"e(B
(e\$B;d\$N9M\$(\$NHOaF\$G\$Oe(B) e\$BD>@\e(B \$! e\$B\$r=q\$-49\$(\$kI,MW\$O\$J\$\$\$Ne(B
e\$B\$+\$b\$l\$^\$;\$s!#e(B

e\$B0J2<\$NNc\$NHO0O\$G\$O\$=\$&;W\$(\$^\$9!#e(B

e\$B\$3\$N:.Mp\$rHr\$1\$k\$?\$a\$Ke(B ldap_open(3) e\$B\$r8F\$VA0\$Ke(B
errno = 0 e\$B\$r<B9T\$9\$k\$h\$&\$K\$7\$^\$7\$?!#e(B

\$!e\$B\$Oe(Brescue/ensuree\$B\$rH4\$1\$k\$H\$-\$K<+F0E*\$K85\$NCM\$KI|5"\$5\$l\$^\$9\$7!"e(B
e\$BNc305!9=\$He(Berrnoe\$B\$H\$NHf3S\$OITE,@Z\$G\$7\$g\$&!#e(B

lib/test/unit/autorunner.rb e\$B\$Ne(B process_args() e\$B\$N\$h\$&\$Ke(B
e\$B0U?^E*\$K%(%i!<>pJs\$r1#JC\$7\$?\$j\$9\$k\$3\$H\$b\$"\$ke(B
(e\$BL5;k\$7\$?\$\$!"I=<(\$7\$?\$/\$J\$\$>l9ge(B) e\$B\$G\$7\$g\$&\$7!"e(B
e\$BJL\$N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