Sam Roberts wrote:

> Quoteing matz / ruby-lang.org, on Tue, Nov 30, 2004 at 08:32:04AM +0900:
>>The point is that
>>
>>  100.times | i | puts
>>
>>is totally valid syntax.  It is very hard for a parser to detect this
>>type of error.  If anyone comes up with an idea, please tell me.
> 
> It is? Well, you would know... :-) but I'm confused!
> 
> $ irb18
> irb(main):001:0> 100.times | i | puts
> LocalJumpError: no block given
>         from (irb):1:in `times'
>         from (irb):1

Use ruby -c to check syntax:

C:\dev\ruby>ruby -c -e "100.times | i | puts"
Syntax OK