Skip to content

Instantly share code, notes, and snippets.

@ainame
Created December 25, 2011 16:54
Show Gist options
  • Select an option

  • Save ainame/1519491 to your computer and use it in GitHub Desktop.

Select an option

Save ainame/1519491 to your computer and use it in GitHub Desktop.
do〜while in ruby
# C言語では こんな感じなのが
#
# int flag = 0
# do{
# flag = hoge ? 1 : 0;
# } while (flag);
#
# Rubyでは
flag = false
begin
flag = hoge ? true : false
end while flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment