SciRuby / rubex

rubex - A Ruby-like language for writing Ruby C extensions.
BSD 2-Clause "Simplified" License
451 stars 21 forks source link

Fix expression generation in loop expressions #60

Open v0dro opened 6 years ago

v0dro commented 6 years ago

This goes wrong. Which it should not.

class String
  def blank?(str string)
    char *s = string
    int i = 0

    while i < string.size do
      return false if s[i] != ' '
      i += 1
    end

    return true
  end
end