-
-
Save yaotti/6251454 to your computer and use it in GitHub Desktop.
These code cause SEGV in ruby 2.1.0-dev but the bug is already fixed in ruby-head (I tested it in ff377d9e81e9c0e58ba1034b1b58cfb68d63c301).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def let(name, &block) | |
::BasicObject.send(:define_method, name, &block) | |
define_method(name) do | |
super(&nil) | |
end | |
end | |
let(:foo) { foo } | |
foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec' | |
describe Object do | |
let(:foo) { foo } | |
it 'causes segv' do | |
foo | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment