Hi, I think I've found a bug in the Ruby SDK.
When the
hashAttribute
is an Integer, I'm receiving the following error:
Copy code
/usr/local/bundle/gems/growthbook-0.2.0/lib/growthbook/context.rb:127:in `run': undefined method `length' for 123:Integer (NoMethodError)
return get_experiment_result(exp) if hash_value.length.zero?
^^^^^^^
from /usr/local/bundle/gems/growthbook-0.2.0/lib/growthbook/context.rb:92:in `block in eval_feature'
from /usr/local/bundle/gems/growthbook-0.2.0/lib/growthbook/context.rb:73:in `each'
from /usr/local/bundle/gems/growthbook-0.2.0/lib/growthbook/context.rb:73:in `eval_feature'
from /usr/local/bundle/gems/growthbook-0.2.0/lib/growthbook/context.rb:164:in `on?'
from growthbook.rb:69:in `<main>'
That's is not happening with the Python SDK.
f
future-teacher-7046
09/08/2022, 12:58 PM
Thanks. In the other SDKs I think we cast the hashAttribute to a string before using. Should be an easy fix. I'll make sure to add an automated test case for this too.
👍 1
future-teacher-7046
09/08/2022, 2:54 PM
Just released a new Ruby SDK version 0.3.0 with that fix.