diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2014-09-21 12:57:44 +0200 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2014-09-21 12:57:49 +0200 |
commit | 4ef78e68c1796023f5d0b6152c82b8d2f52c0777 (patch) | |
tree | e08e2a7ad552d8919c92db541acf9749d691579c | |
parent | e228cd1060dbc736493a114bb05b95d79a37bcff (diff) | |
download | org-mode-4ef78e68c1796023f5d0b6152c82b8d2f52c0777.tar.gz |
ob-ruby: fix a24775dc79 again
* lisp/ob-ruby.el (org-babel-ruby-evaluate): Temporarily disable the
irb prompt to ensure that the output is properly recognized using
the standard settings from inf-ruby and no extra settings in .irbrc
or other configuration files from Ruby. Remove superfluous
`comint-send-input' that produced a spurious empty line in output.
* testing/lisp/test-ob-ruby.el (test-ob-ruby/session-output): Remove
spurious emtpy line in expected output.
-rw-r--r-- | lisp/ob-ruby.el | 6 | ||||
-rw-r--r-- | testing/lisp/test-ob-ruby.el | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el index fd59ef4..72196f6 100644 --- a/lisp/ob-ruby.el +++ b/lisp/ob-ruby.el @@ -221,8 +221,10 @@ return the value of the last statement in BODY, as elisp." (mapc (lambda (line) (insert (org-babel-chomp line)) (comint-send-input nil t)) - (list "conf.echo=false" body "conf.echo=true" org-babel-ruby-eoe-indicator)) - (comint-send-input nil t)) 2) + (list "conf.echo=false;_org_prompt_mode=conf.prompt_mode;conf.prompt_mode=:NULL" + body + "conf.prompt_mode=_org_prompt_mode;conf.echo=true" org-babel-ruby-eoe-indicator)) + ) 2) "\n") "[\r\n]")) "\n")) (value (let* ((tmp-file (org-babel-temp-file "ruby-")) diff --git a/testing/lisp/test-ob-ruby.el b/testing/lisp/test-ob-ruby.el index 74cf163..b3231cd 100644 --- a/testing/lisp/test-ob-ruby.el +++ b/testing/lisp/test-ob-ruby.el @@ -39,7 +39,6 @@ puts s #+end_src #+RESULTS: -: : 3 "))) |