Hey list!

I found a minor bug when setting a 'jump to' command directly on a
workitem when doing something like

workitem.command = ["jump", "participant"]

or

workitem.command = "jump to participant"

as the docs (http://ruote.rubyforge.org/exp/cursor.html) suggest.

The problem is on line 260 of workitem.rb:
https://github.com/jmettraux/ruote/blob/ruote2.1/lib/ruote/workitem.rb#L260.
Right now it only considers the scenarii for setting "rewind" and
"back 2" and it parses to integer, but it fails to consider that a
"jump" does a string.

A simple fix would be like this: https://gist.github.com/670066

If ternary operators are your thing, it'd be something more like this:

-------8<---------
com[1] = (com[0] == "jump" ? (com[2].nil? ? com[1] : com[2]) :
com[1].to_i) if com[1]
com.delete_at(2) if com[2]
------->8---------

Hope it helps :)

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to