[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Problem with src_ruby inline code and []
From: |
William Denton |
Subject: |
[O] Problem with src_ruby inline code and [] |
Date: |
Tue, 15 Mar 2016 14:13:17 -0400 (EDT) |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
I was updating and exporting a file where I use Ruby to do some basic
arithmetic on tables, and noticed that inline code blocks where I reference an
array aren't working.
If you C-c C-c on this simple src_ruby example you get the results.
src_ruby{1 + 2} {{{results(=3=)}}}
But this doesn't work:
#+NAME: sampletable
| name | one | two |
| Me | 5 | 3 |
| You | 4 | 6 |
src_ruby[:var t=sampletable]{t[2][2]}
It changes the line to
src_ruby[:var t=sampletable]{t[2] {{{results(==)}}}[2]}
and says:
-:5: syntax error, unexpected keyword_end, expecting ']'
-:7: syntax error, unexpected end-of-input, expecting keyword_end
However, this does work:
#+BEGIN_SRC ruby :var t=sampletable
t[2][2]
#+END_SRC
#+RESULTS:
: 6
Bill
--
William Denton ↔ Toronto, Canada ↔ https://www.miskatonic.org/
- [O] Problem with src_ruby inline code and [],
William Denton <=