colinsurprenant / redstorm

JRuby on Storm
Other
298 stars 56 forks source link

This allows for on_* to be defined by defining the corresponding instance method #118

Closed ismith closed 7 years ago

ismith commented 10 years ago

directly. Prior to this fix, doing this will result in "SystemStackError: stack level too deep".

Example module RedStorm module Examples class SplitSentenceBolt < DSL::Bolt def on_receive(tuple) tuple[0].split(' ').map{|w| [w]} end end end end

ismith commented 10 years ago

This bug is because the dsl is overzealous in calling define_method(:on_receive).

coveralls commented 10 years ago

Coverage Status

Coverage increased (+0.0%) when pulling 80daa75a10956af8ed7845087a5d86508321727e on lookout:bolt_block_fix into 3f711edc96d7769a73010e903cafc3647b44d7fe on colinsurprenant:master.

colinsurprenant commented 10 years ago

doh! good catch. see inline comments. also, we should also apply this fix to all similar constructs in the dsls.

coveralls commented 10 years ago

Coverage Status

Coverage increased (+0.0%) when pulling 1b85492b094e32f8d9d3b949ee2ed5f05f8df159 on lookout:bolt_block_fix into 3f711edc96d7769a73010e903cafc3647b44d7fe on colinsurprenant:master.

ismith commented 10 years ago

@colinsurprenant Any thoughts on the current state of this PR?

ismith commented 10 years ago

@colinsurprenant poke?

ismith commented 9 years ago

@colinsurprenant repoke?

ismith commented 7 years ago

I'm going to close this as inactive, two years later; if someone wants to resurrect the code, feel free.