fixed bug with exportation of ruby arrays

This commit is contained in:
Eric Schulte 2009-04-23 15:57:16 -07:00
parent 9652615618
commit 64e01ac324
3 changed files with 11 additions and 3 deletions

View File

@ -48,7 +48,7 @@ automatically generated wrapper for `litorgy-script-execute'.")
def main
%s
end
puts main
puts main().inspect
")
(defvar litorgy-script-python-wrapper-method
@ -89,7 +89,9 @@ executed through litorgy."
(format "\t%s\n" line))
(butlast body-lines) "\n")
(format "\treturn %s\n" (car (last body-lines)))))))
;; (message (buffer-substring (point-min) (point-max))) ;; debug script
(shell-command-on-region (point-min) (point-max) cmd nil 'replace)
;; (message (buffer-string)) ;; debug results
(litorgy-script-table-or-results (buffer-string))))))
(defun litorgy-script-var-to-ruby/python (var)

View File

@ -229,14 +229,14 @@ following message =no result returned by source block=.
** TODO ruby arrays not recognized as such
Something is wrong in [[file:litorgy/ligorgy-script.el]] related to the
Something is wrong in [[file:litorgy/litorgy-script.el]] related to the
recognition of ruby arrays as such.
#+begin_src ruby :results replace
[1, 2, 3, 4]
#+end_src
: 1
| 1 | 2 | 3 | 4 |
#+begin_src python :results replace
[1, 2, 3, 4]

View File

@ -33,6 +33,12 @@ This is a source block, and lets see the results
:the_results
#+end_src
lets see the source, and results for a ruby array
#+begin_src ruby :results replace
[1, 2, 3, 4].map{ |n| n * 2 }
#+end_src
** emacs-lisp
a table