[ruby-talk:02411] Re: Could missing 'end' be reported better?

From: Dave Thomas <Dave@...>
Date: 2000-04-09 21:43:20 UTC
List: ruby-talk #2411
h.fulton@att.net writes:

>   2. This one is not going to happen: Have more than one
>      kind of 'end' -- say explicitly "end def", "end class",
>      "end if", etc.

Actually, _could_ this one happen? Right now can anything appear after 
an 'end'? If not, could we allow the name of the construct after the
'end' for checking purposes. If omitted, there'd be no check. If
present, then we'd chck that the end corresponded to the appropriate
construct.

  class Fred
    def method
      a = 1
      b = 2
    end def
  end class

  for i in 1..10
    # stuff
  end for


  (1..10).each do

  end do


and so on.  Personally, I don't think I'd use this very often, but it
seems like it would be feasible.


Dave

In This Thread

Prev Next