Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

FactoryGirl and word 'define' #883

Closed
e1senh0rn opened this Issue · 1 comment

3 participants

@e1senh0rn

Here is the example code:

require 'rubygems'
require 'factory_girl'
Factory.define :user, :class => Object do |f|
end

Code is running well with REE, but fails with rbx with following error:

An exception occurred running app.rb
    method 'define': given 2, expected 0 (ArgumentError)

Backtrace:
  Factory.define (method_missing) at /Users/dm/.rvm/gems/rbx-head@rails3/gems
                                     /factory_girl-2.0.0.beta2/lib/factory_girl
                                     /deprecated.rb:5
                 Object#__script__ at app.rb:4
  Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
  Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:90
           Rubinius::Loader#script at kernel/loader.rb:580
             Rubinius::Loader#main at kernel/loader.rb:715

Rubinius version info:

rubinius 1.2.4dev (1.8.7 c2ee19fc yyyy-mm-dd JI) [x86_64-apple-darwin10.7.0]
@dbussink
Owner

Abstracted this issue to the following code:

module Mod

  module Global
  end

end

include Mod

module Global
end

p Global.equal?(Mod::Global)
@evanphx evanphx closed this in 6a5cd94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.