Skip to content

Instantly share code, notes, and snippets.

@tildedave
Created December 2, 2010 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tildedave/725337 to your computer and use it in GitHub Desktop.
Save tildedave/725337 to your computer and use it in GitHub Desktop.
from Andrew Kennedy
# scoping in ruby 1.8.7
x = 0
[1,2,3].each{|x| puts x}
puts x
@banister
Copy link

@ironcamel,

Are you aware that Ruby 1.9 is almost a total reimplementation of Ruby? You appear to think it was a minor update.

Internally, Ruby 1.9 has very little in common with Ruby 1.8. In terms of features; Ruby 1.9 adds some major new features and cleans up a few inconsistencies and bugs - one of those bugs being the block variable scoping pointed out in this gist. Nonetheless Ruby 1.9 aims to be more or less 95% backwards compatible with Ruby 1.8 - which it has achieved.

Major releases are allowed to have breaking changes. Ruby 1.9 is a major release, it has breaking changes. In terms of 'expectation' - there were expected to be breaking changes. Once again: It is a Major Release.

Get over it. Everyone else has.

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