Skip to content

i++ #41

@hakunin

Description

@hakunin

I often find myself in need of i++, for example:

i = 0
rows.each { |row|
  row_class = (i % 2 == 0) ? "even" : "odd"
  html += "..."
  i += 1
}

Writing i += 1 sucks. Also i++ seems to be more expressive because I don't mean to add one, I man to increment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions