rubinius/rubinius — pull request #2378 by charliesome (2013-06-08 11:08:34+00:00)
Title: Invalidate method cache if included module has constants

Rubinius currently does not increment the global serial number if an included module has constants.

This means that cached constant lookups could return incorrect results.

Here's a little test script:

```ruby
A = 1

class Foo
def self.go
A
end
end

module M
A = 2
end

puts Foo.go # prints 1

Foo.send(:include, M)

puts Foo.go # should print 2, prints 1
```