Brad Phelan wrote: > Chad Perrin wrote: >> On Tue, May 22, 2007 at 07:05:04AM +0900, Brad Phelan wrote: >>> Rick DeNatale wrote: >>>> Why do I get the impression that this thread is trying to develop a >>>> new language called FrankenRuPy? <G> >>>> >>>> >>> Now, now! It's just a sweet little creation. It couldn't hurt anyone >>> could it ? >> >> What if it does? It might accidentally cause the death of the mad >> scientist that created it, and attract the attention of the townsfolk >> who will come with torches and pitchforks to kill the beast! Oh noes! >> >> Oh, wait, that's the plot of an old book. Never mind. >> > > I upgraded the little library so that it has better error detection > and can handle else, end and rescue dedents even if the colon : eol > operator has been used. > > > http://xtargets.com/snippets/posts/show/68 > > def foo: > [1,2,3,4].each do |i|: > puts i > [1,2,3,4].each do |j|: > puts i > if i == 2 : > puts "foo" > else: > puts "bar" > > > is now possible. BTW if this triggers a rubyforge project I do like > the name "Frankenrupy", Rick! > > > -- > Brad Phelan > http://xtargets.com In general I think that above is not a good idea for Ruby. However it does look good when dealing with libraries like Markaby where the number of closing ends starts to look very scary From some of my own templates table do @components.each do |row| tr do row.each do |col| td do pre do text col end end end end end end end whereas it could look like table do : @components.each do |row| : tr do row.each do |col| : td do : pre do : text col which gives it a feel like a YAML file. -- Brad Phelan http://xtargets.com