Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » RubyBlock with brackets or do |x|(Why DLTK ruby treats as the same thing?)
RubyBlock with brackets or do |x| [message #1328129] Fri, 02 May 2014 14:26
Alexandre Torres is currently offline Alexandre TorresFriend
Messages: 139
Registered: July 2009
Senior Member
Ruby allows blocks with variables, what is implemented by DLTK by the RubyBlock class.

my_array.each { |item|
puts item
}

Or

my_array.each do |item|
puts item
end

The problem here is that is not only a cosmetic choice! {} and do...end have distinct precedence orders. However I can´t find out how to differentiate one and other using DLTK´s RubyBlock

Thanks

[Updated on: Fri, 02 May 2014 14:27]

Report message to a moderator

Previous Topic:Problems Importing DLTK TCL project(s)
Next Topic:Debugging Ruby
Goto Forum:
  


Current Time: Fri May 22 19:12:39 GMT 2015

Powered by FUDForum. Page generated in 0.01687 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software