New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line comments cause unrunnable ruby code to be generated #592

Closed
Nava2 opened this Issue Aug 26, 2015 · 0 comments

Comments

Projects
None yet
3 participants
@Nava2
Member

Nava2 commented Aug 26, 2015

Originally reported on Google Code with ID 694


What steps will reproduce the problem?

  1. As an example, use the following umple code:

class A
{
//This is a multiline comment
//Which breaks generated ruby code
name;
}

  1. Then generate ruby from it
  2. Attempt to run the ruby with "ruby a.rb"

The multi-line comments are not translated correctly into ruby.
The current syntax being used is the:

=begin
COMMENT BLOCK
=end

Which is supported in ruby, but only if the '=begin' and '=end' have no whitespace
before them. This fails because the umple code generates this syntax indented to whatever
level of indentation the surrounding code is at.

In the Ruby community, this syntax is considered awkward to use, and the most common
suggestion is simply to use a inline comment tag, '#', for each line of the multi-line
comment. Thus, the best solution to this bug would be to follow this convention.


Reported by @CraigBryan on 2015-03-31 13:39:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment