mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
8752585250
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
4.6 KiB
4.6 KiB
irb$B4XO"$*$^$1%3%^%s%I$H%i%$%V%i%j
$Release Version: 0.7.1 $
$Revision$
$Date$
by Keiju ISHITSUKA(Nihon Rational Co.,Ltd.)
==begin
:$B%3%^%s%I:
* rtags -- ruby tags command
:$B4X?t%i%$%V%i%j:
* xmp -- irb version of gotoken xmp-function
:$B%/%i%9%i%$%V%i%j:
* frame.rb -- frame tracer
* completion.rb -- irb completor
= rtags
rtags$B$Oemacs$B5Z$Svi$BMQ$N, TAG$B%U%!%$%k$r$D$/$k%3%^%s%I$G$9.
== $B;H$$J}
rtags [-vi] file....
$B%+%l%s%H%G%#%l%/%H%j$Kemacs$BMQ$NTAGS$B%U%!%$%k$,$G$-$^$9. -vi$B%*%W%7%g%s$r
$B$D$1$?;~$K$Ovi$BMQ$Ntags$B%U%!%$%k$r:n@.$7$^$9.
emacs$B$N>l9g, $BDL>o$Netags.el$B$,$=$N$^$^;H$($^$9. $B8!:w2DG=$J$N$O,
* $B%/%i%9
* $B%a%=%C%I
* $BFC0[%a%=%C%I
* alias
* attr$B$G@k8@$5$l$?%"%/%;%5($B%Q%i%a!<%?$,%7%s%\%k$+J8;zNs%j%F%i%k$K8B$k)
* attr_XXX$B$G@k8@$5$l$?%"%/%;%5($B%Q%i%a!<%?$,%7%s%\%k$+J8;zNs%j%F%i%k$K8B$k)
$B$G$9.
C$B$J$I$G;H$C$F$$$k$N$H0c$&$N$O, $B%3%s%W%j!<%7%g%s$K4X$9$kItJ,$G,
$B4X?tL>$O,
$B4X?tL>(
$B%/%i%9$O,
::$B%/%i%9L>::....::$B%/%i%9L>
$B%a%=%C%I$O,
::$B%/%i%9L>::....::$B%/%i%9L>#$B%a%=%C%IL>
$BFC0[%a%=%C%I($B%/%i%9%a%=%C%I)$B$O
::$B%/%i%9L>::....::$B%/%i%9L>.$B%a%=%C%IL>
$B$G%3%s%W%j!<%7%g%s$r9T$J$&$H$3$m$G$9.
= xmp.rb
$B$4$H$1$sxmp$B$N>e0L8_49%P!<%8%g%s$G$9. $B$?$@, $BHs>o$K=E$$$N$G$4$H$1$sxmp$B$G
$B$OBP1~$G$-$J$$;~$K, $B;HMQ$9$k$HNI$$$G$7$g$&.
== $B;H$$J}
=== $B4X?t$H$7$F;H$&.
require "irb/xmp"
xmp <<END
foo = 1
foo
END
---
foo = 1
==>1
foo
==>1
=== XMP$B%$%s%9%?%s%9$rMQ$$$k.
$B$3$N>l9g$O, XMP$B$,%3%s%F%-%9%H>pJs$r;}$D$N$G, $BJQ?t$NCM$J$I$rJ];}$7$F$$
$B$^$9.
require "irb/xmp"
xmp = XMP.new
xmp.puts <<END
foo = 1
foo
END
xmp.puts <<END
foo
END
===
foo = 1
==>1
foo
==>1
foo
==>1
== $B%3%s%F%-%9%H$K4X$7$F
XMP$B%a%=%C%I72$N%3%s%F%-%9%H$O, $B8F$S=P$9A0$N%3%s%F%-%9%H$GI>2A$5$l$^$9.
$BL@<(E*$K%3%s%F%-%9%H$r;XDj$9$k$H$=$N%3%s%F%-%9%H$GI>2A$7$^$9.
$BNc:
xmp "foo", an_binding
:$BCm:
$B%^%k%A%9%l%C%I$K$OBP1~$7$F$$$^$;$s.
= frame.rb
$B8=:_<B9TCf$N%U%l!<%`>pJs$r<h$j07$&$?$a$N%/%i%9$G$9.
* IRB::Frame.top(n = 0)
$B>e$+$in$BHVL\$N%3%s%F%-%9%H$r<h$j=P$7$^$9. n$B$O0$B$,:G>e0L$K$J$j$^$9.
* IRB::Frame.bottom(n = 0)
$B2<$+$in$BHVL\$N%3%s%F%-%9%H$r<h$j=P$7$^$9. n$B$O0$B$,:G2<0L$K$J$j$^$9.
* IRB::Frame.sender
$B%;%s%@$K$J$C$F$$$k%*%V%8%'%/%H$r<h$j=P$7$^$9. $B%;%s%@$H$O, $B$=$N%a%=%C
$B%I$r8F$S=P$7$?B&$Nself$B$N$3$H$G$9.
:$BCm:
set_trace_func$B$rMQ$$$FRuby$B$N<B9T$r%H%l!<%9$7$F$$$^$9. $B%^%k%A%9%l%C%I$K
$B$OBP1~$7$F$$$^$;$s.
= completion.rb
irb$B$Ncompletion$B5!G=$rDs6!$9$k$b$N$G$9.
== $B;H$$J}
% irb -r irb/completion
$B$H$9$k$+, ~/.irbrc $BCf$K
require "irb/completion"
$B$rF~$l$F$/$@$5$$. irb$B<B9TCf$K require "irb/completion" $B$7$F$b$h$$$G$9.
irb$B<B9TCf$K (TAB) $B$r2!$9$H%3%s%W%l!<%7%g%s$7$^$9.
$B%H%C%W%l%Y%k$G(TAB)$B$r2!$9$H$9$Y$F$N9=J8MWAG, $B%/%i%9, $B%a%=%C%I$N8uJd$,$G
$B$^$9. $B8uJd$,M#0l$J$i$P40A4$KJd40$7$^$9.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Object.new
#<Object:0x4027146c>
((|$BJQ?tL>.|))$B$N8e$K(TAB)$B$r2!$9$H, $B$=$N%*%V%8%'%/%H$N%a%=%C%I0lMw$,$G$^
$B$9.
irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class foo.instance_of? foo.taint
foo.clone foo.instance_variables foo.tainted?
foo.display foo.is_a? foo.to_a
foo.dup foo.kind_of? foo.to_s
foo.eql? foo.method foo.type
foo.equal? foo.methods foo.untaint
foo.extend foo.nil?
foo.freeze foo.private_methods
==end
% Begin Emacs Environment
% Local Variables:
% mode: text
% comment-column: 0
% comment-start: "%"
% comment-end: "\n"
% End:
%
$Release Version: 0.7.1 $
$Revision$
$Date$
by Keiju ISHITSUKA(Nihon Rational Co.,Ltd.)
==begin
:$B%3%^%s%I:
* rtags -- ruby tags command
:$B4X?t%i%$%V%i%j:
* xmp -- irb version of gotoken xmp-function
:$B%/%i%9%i%$%V%i%j:
* frame.rb -- frame tracer
* completion.rb -- irb completor
= rtags
rtags$B$Oemacs$B5Z$Svi$BMQ$N, TAG$B%U%!%$%k$r$D$/$k%3%^%s%I$G$9.
== $B;H$$J}
rtags [-vi] file....
$B%+%l%s%H%G%#%l%/%H%j$Kemacs$BMQ$NTAGS$B%U%!%$%k$,$G$-$^$9. -vi$B%*%W%7%g%s$r
$B$D$1$?;~$K$Ovi$BMQ$Ntags$B%U%!%$%k$r:n@.$7$^$9.
emacs$B$N>l9g, $BDL>o$Netags.el$B$,$=$N$^$^;H$($^$9. $B8!:w2DG=$J$N$O,
* $B%/%i%9
* $B%a%=%C%I
* $BFC0[%a%=%C%I
* alias
* attr$B$G@k8@$5$l$?%"%/%;%5($B%Q%i%a!<%?$,%7%s%\%k$+J8;zNs%j%F%i%k$K8B$k)
* attr_XXX$B$G@k8@$5$l$?%"%/%;%5($B%Q%i%a!<%?$,%7%s%\%k$+J8;zNs%j%F%i%k$K8B$k)
$B$G$9.
C$B$J$I$G;H$C$F$$$k$N$H0c$&$N$O, $B%3%s%W%j!<%7%g%s$K4X$9$kItJ,$G,
$B4X?tL>$O,
$B4X?tL>(
$B%/%i%9$O,
::$B%/%i%9L>::....::$B%/%i%9L>
$B%a%=%C%I$O,
::$B%/%i%9L>::....::$B%/%i%9L>#$B%a%=%C%IL>
$BFC0[%a%=%C%I($B%/%i%9%a%=%C%I)$B$O
::$B%/%i%9L>::....::$B%/%i%9L>.$B%a%=%C%IL>
$B$G%3%s%W%j!<%7%g%s$r9T$J$&$H$3$m$G$9.
= xmp.rb
$B$4$H$1$sxmp$B$N>e0L8_49%P!<%8%g%s$G$9. $B$?$@, $BHs>o$K=E$$$N$G$4$H$1$sxmp$B$G
$B$OBP1~$G$-$J$$;~$K, $B;HMQ$9$k$HNI$$$G$7$g$&.
== $B;H$$J}
=== $B4X?t$H$7$F;H$&.
require "irb/xmp"
xmp <<END
foo = 1
foo
END
---
foo = 1
==>1
foo
==>1
=== XMP$B%$%s%9%?%s%9$rMQ$$$k.
$B$3$N>l9g$O, XMP$B$,%3%s%F%-%9%H>pJs$r;}$D$N$G, $BJQ?t$NCM$J$I$rJ];}$7$F$$
$B$^$9.
require "irb/xmp"
xmp = XMP.new
xmp.puts <<END
foo = 1
foo
END
xmp.puts <<END
foo
END
===
foo = 1
==>1
foo
==>1
foo
==>1
== $B%3%s%F%-%9%H$K4X$7$F
XMP$B%a%=%C%I72$N%3%s%F%-%9%H$O, $B8F$S=P$9A0$N%3%s%F%-%9%H$GI>2A$5$l$^$9.
$BL@<(E*$K%3%s%F%-%9%H$r;XDj$9$k$H$=$N%3%s%F%-%9%H$GI>2A$7$^$9.
$BNc:
xmp "foo", an_binding
:$BCm:
$B%^%k%A%9%l%C%I$K$OBP1~$7$F$$$^$;$s.
= frame.rb
$B8=:_<B9TCf$N%U%l!<%`>pJs$r<h$j07$&$?$a$N%/%i%9$G$9.
* IRB::Frame.top(n = 0)
$B>e$+$in$BHVL\$N%3%s%F%-%9%H$r<h$j=P$7$^$9. n$B$O0$B$,:G>e0L$K$J$j$^$9.
* IRB::Frame.bottom(n = 0)
$B2<$+$in$BHVL\$N%3%s%F%-%9%H$r<h$j=P$7$^$9. n$B$O0$B$,:G2<0L$K$J$j$^$9.
* IRB::Frame.sender
$B%;%s%@$K$J$C$F$$$k%*%V%8%'%/%H$r<h$j=P$7$^$9. $B%;%s%@$H$O, $B$=$N%a%=%C
$B%I$r8F$S=P$7$?B&$Nself$B$N$3$H$G$9.
:$BCm:
set_trace_func$B$rMQ$$$FRuby$B$N<B9T$r%H%l!<%9$7$F$$$^$9. $B%^%k%A%9%l%C%I$K
$B$OBP1~$7$F$$$^$;$s.
= completion.rb
irb$B$Ncompletion$B5!G=$rDs6!$9$k$b$N$G$9.
== $B;H$$J}
% irb -r irb/completion
$B$H$9$k$+, ~/.irbrc $BCf$K
require "irb/completion"
$B$rF~$l$F$/$@$5$$. irb$B<B9TCf$K require "irb/completion" $B$7$F$b$h$$$G$9.
irb$B<B9TCf$K (TAB) $B$r2!$9$H%3%s%W%l!<%7%g%s$7$^$9.
$B%H%C%W%l%Y%k$G(TAB)$B$r2!$9$H$9$Y$F$N9=J8MWAG, $B%/%i%9, $B%a%=%C%I$N8uJd$,$G
$B$^$9. $B8uJd$,M#0l$J$i$P40A4$KJd40$7$^$9.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Object.new
#<Object:0x4027146c>
((|$BJQ?tL>.|))$B$N8e$K(TAB)$B$r2!$9$H, $B$=$N%*%V%8%'%/%H$N%a%=%C%I0lMw$,$G$^
$B$9.
irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class foo.instance_of? foo.taint
foo.clone foo.instance_variables foo.tainted?
foo.display foo.is_a? foo.to_a
foo.dup foo.kind_of? foo.to_s
foo.eql? foo.method foo.type
foo.equal? foo.methods foo.untaint
foo.extend foo.nil?
foo.freeze foo.private_methods
==end
% Begin Emacs Environment
% Local Variables:
% mode: text
% comment-column: 0
% comment-start: "%"
% comment-end: "\n"
% End:
%