diff options
| author | Carsten Dominik | 2010-12-11 17:42:53 +0100 |
|---|---|---|
| committer | Carsten Dominik | 2010-12-11 17:42:53 +0100 |
| commit | acedf35ce08b9df4a0dcbcd1413e7d85f1182034 (patch) | |
| tree | 240e26f10d2feb66e8c0cd0634082fcb7bd577e5 /lisp/org/ob-ruby.el | |
| parent | 39321b94bfa4e50401e30caedfd09a06629f5bd2 (diff) | |
| download | emacs-acedf35ce08b9df4a0dcbcd1413e7d85f1182034.tar.gz emacs-acedf35ce08b9df4a0dcbcd1413e7d85f1182034.zip | |
Update to Org mode 7.4
Diffstat (limited to 'lisp/org/ob-ruby.el')
| -rw-r--r-- | lisp/org/ob-ruby.el | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index 70b46411086..3f2af394603 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | ;;; ob-ruby.el --- org-babel functions for ruby evaluation | 1 | ;;; ob-ruby.el --- org-babel functions for ruby evaluation |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation |
| 4 | 4 | ||
| 5 | ;; Author: Eric Schulte | 5 | ;; Author: Eric Schulte |
| 6 | ;; Keywords: literate programming, reproducible research | 6 | ;; Keywords: literate programming, reproducible research |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 7.3 | 8 | ;; Version: 7.4 |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -29,10 +29,10 @@ | |||
| 29 | ;;; Requirements: | 29 | ;;; Requirements: |
| 30 | 30 | ||
| 31 | ;; - ruby and irb executables :: http://www.ruby-lang.org/ | 31 | ;; - ruby and irb executables :: http://www.ruby-lang.org/ |
| 32 | ;; | 32 | ;; |
| 33 | ;; - ruby-mode :: Can be installed through ELPA, or from | 33 | ;; - ruby-mode :: Can be installed through ELPA, or from |
| 34 | ;; http://github.com/eschulte/rinari/raw/master/util/ruby-mode.el | 34 | ;; http://github.com/eschulte/rinari/raw/master/util/ruby-mode.el |
| 35 | ;; | 35 | ;; |
| 36 | ;; - inf-ruby mode :: Can be installed through ELPA, or from | 36 | ;; - inf-ruby mode :: Can be installed through ELPA, or from |
| 37 | ;; http://github.com/eschulte/rinari/raw/master/util/inf-ruby.el | 37 | ;; http://github.com/eschulte/rinari/raw/master/util/inf-ruby.el |
| 38 | 38 | ||
| @@ -116,16 +116,7 @@ specifying a variable of the same value." | |||
| 116 | "Convert RESULTS into an appropriate elisp value. | 116 | "Convert RESULTS into an appropriate elisp value. |
| 117 | If RESULTS look like a table, then convert them into an | 117 | If RESULTS look like a table, then convert them into an |
| 118 | Emacs-lisp table, otherwise return the results as a string." | 118 | Emacs-lisp table, otherwise return the results as a string." |
| 119 | (org-babel-read | 119 | (org-babel-script-escape results)) |
| 120 | (if (and (stringp results) (string-match "^\\[.+\\]$" results)) | ||
| 121 | (org-babel-read | ||
| 122 | (concat "'" | ||
| 123 | (replace-regexp-in-string | ||
| 124 | "\\[" "(" (replace-regexp-in-string | ||
| 125 | "\\]" ")" (replace-regexp-in-string | ||
| 126 | ", " " " (replace-regexp-in-string | ||
| 127 | "'" "\"" results)))))) | ||
| 128 | results))) | ||
| 129 | 120 | ||
| 130 | (defun org-babel-ruby-initiate-session (&optional session params) | 121 | (defun org-babel-ruby-initiate-session (&optional session params) |
| 131 | "Initiate a ruby session. | 122 | "Initiate a ruby session. |