Mike Gauland <mikely...@gmail.com> writes:

> I've redefined org-babel-ruby-var-to-ruby in my init.el to add a newline 
> after each element in an array, which I think will work for anything 
> less than a 4k-long string. Ideally, the hard-coded \n would follow the 
> EOL convention of the buffer, but I haven't gotten that far yet.
>
>
> (defun org-babel-ruby-var-to-ruby (var)
>    "Convert VAR into a ruby variable.
> Convert an elisp value into a string of ruby source code
> specifying a variable of the same value."
>    (if (listp var)
>        (concat "[" (mapconcat #'org-babel-ruby-var-to-ruby var ", \n") "]")

I think Emacs should handle it automatically.

Also, it looks like ruby sessions are broken now:

#+begin_src ruby :session org-test-ruby :results output
s = "1"
s = "2"
s = "3"
puts s
s = "4"
#+end_src

yields nothing.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to