Skip to content

Commit

Permalink
Fixed annoying bug in the REPL thing
Browse files Browse the repository at this point in the history
  • Loading branch information
duairc committed Jul 8, 2009
1 parent 4015a88 commit 1af95eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions repl.rb
@@ -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
Expand Down

0 comments on commit 1af95eb

Please sign in to comment.