This page must use the Rübÿ Spëëd Mëtäl Cödïng template!!!111

This commit is contained in:
AstRobot 2006-05-18 19:23:32 +00:00
parent 6ecb97cf4e
commit f4b81a9bbc
1 changed files with 4 additions and 5 deletions

9
Irb.mw
View File

@ -16,12 +16,10 @@ begin
puts "History file '%s' was empty or non-existant." %
histfile if $DEBUG || $VERBOSE
end
Kernel::at_exit {
lines = Readline::HISTORY.to_a.reverse.uniq.reverse
lines = lines[ -MAXHISTSIZE, MAXHISTSIZE ] if lines.nitems > MAXHISTSIZE
$stderr.puts "Saving %d history lines to %s." %
[ lines.length, histfile ] if $VERBOSE || $DEBUG
File::open( histfile, File::WRONLY|File::CREAT|File::TRUNC ) {|ofh|
lines.each {|line| ofh.puts line }
@ -30,13 +28,11 @@ begin
end
end
</pre>
=ri in irb=
<pre>
def ri arg
puts `ri #{arg}`
end
class Module
def ri(meth=nil)
if meth
@ -51,9 +47,12 @@ class Module
end
end
</pre>
=Tab completion=
<pre>
require 'irb/completion'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
</pre>
{{Rübÿ Spëëd Mëtäl Cödïng}}