Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Use of ObjectSpace may be a JRuby conflict

#99

The current mod_declare used in declarations may conflict with JRuby because it uses ObjectSpace (which JRuby disables by default):


      def mod_declare(klass, declaration, configs={}, &block)
        options = {}
        options[:arity] = arity(block) if block_given?

        subclass = declare(klass, declaration, configs, options)

        if block_given?
          mod = Module.new
          mod.module_eval %Q{
            ACTION = ObjectSpace._id2ref(#{block.object_id})
            def process(*args)
              results = super
              case ACTION.arity
              when 0 then ACTION.call
              when 1 then ACTION.call(self)
              else ACTION.call(self, *args)
              end
              results
            end
          }
          subclass.send(:include, mod)
        end
        subclass.instance
      end

I haven't tested for a conflict, but this is another suggestion that mod_declare is going about things in the wrong way.

Reported by bahuvrihi · September 10th, 2008 @ 09:11 AM

State: invalid
Milestone: Tap-0.11.0
Assigned to: nobody

Activity

  1. bahuvrihi
    bahuvrihi
    • Milestone set to Tap-0.11.0

    September 10th, 2008 @ 09:58 AM

  2. bahuvrihi
    bahuvrihi
    • State changed from new to invalid

    ObjectSpace is no longer used in this way.

    September 30th, 2008 @ 03:52 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.