Hacker News new | past | comments | ask | show | jobs | submit login

this is wrong!

  >> a = 1 
  => 1
  >> b = 2
  => 2
  >> a = 3 unless b==2
  => nil
  >> a
  => 1
  >> a = unless b==2
  >> 2
  >> end
  => nil
  >> a
  => nil
The difference is in the variable definition semantics, not in the assignment semantics. Please do not spread this misinformation.



My bad. Thanks for clarifying that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: