Permalink
Browse files

Fixed annoying bug in the REPL thing

  • Loading branch information...
duairc committed Jul 8, 2009
1 parent 4015a88 commit 1af95ebcea8a664b6488c5777fea52d85e1a59f2
Showing with 1 addition and 2 deletions.
  1. +1 −2 repl.rb
View
@@ -1,6 +1,5 @@
class Array;def mi;i=0;map!{|t|x=yield(i,t);i+=1;x};end;end
-def write;$chapters.each_index{|i|c=$chapters[i];File.open("chapters/chapter#{i
-+ 1}.tex", 'w'){|f|f.write c}};nil;end
+def write;$chapters.each_index{|i|c=$chapters[i];File.open("chapters/chapter#{i+1}.tex", 'w'){|f|f.write c}};nil;end
def read;$chapters=(1..21).map{|i|File.read("chapters/chapter#{i}.tex")};end
def preview;$saved=read;write;end
def revert;$chapters=$saved;write;end

0 comments on commit 1af95eb

Please sign in to comment.