Aaron Madlon-Kay writes:
>> + (run-ruby-or-pop-to-buffer >> + cmd (or session "ruby") >> + (unless session >> + (inf-ruby-buffer))) > > I have just run into an issue with this: If you don't specify :ruby > then `cmd' for me is calculated by > > (cdr (assoc inf-ruby-default-implementation inf-ruby-implementations)) > > which gives the function `inf-ruby--irb-command' as a result. > > However `run-ruby-or-pop-to-buffer' expects to get a string only. Thanks for noting this. Indeed it looks like the old call through run-ruby handled this (run-ruby-or-pop-to-buffer (let ((command (or command (cdr (assoc inf-ruby-default-implementation inf-ruby-implementations))))) (if (functionp command) (funcall command) command)) ...) and that's lost with this switch to run-ruby-or-pop-to-buffer. > I'm not sure if it should be org-mode's responsibility to resolve the > actual command string, or if it should be done by > `run-ruby-or-pop-to-buffer'. (It kind of seems like the latter?) > > Any thoughts? Given the current situation, I don't see a good option aside from doing the functionp dance in org-babel-ruby-initiate-session as well. Even if inf-ruby's check was moved downstream of run-ruby-or-pop-to-buffer, I think it'd be good to fix on ob-ruby's end to work with the current inf-ruby. Juri, what do you think?