From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby Date: Tue, 11 Aug 2015 18:33:30 -0400 Message-ID: <87h9o5316t.fsf@kyleam.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPI6w-00014v-U0 for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 18:33:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPI6t-0004yZ-OC for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 18:33:34 -0400 Received: from mail-qk0-f175.google.com ([209.85.220.175]:34543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPI6t-0004yT-Kp for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 18:33:31 -0400 Received: by qkcs67 with SMTP id s67so52222934qkc.1 for ; Tue, 11 Aug 2015 15:33:31 -0700 (PDT) In-Reply-To: (Matthew MacLean's message of "Tue, 11 Aug 2015 14:52:39 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matthew MacLean Cc: emacs-orgmode@gnu.org Matthew MacLean wrote: > Yo~! > > fa5fd6351605912ec75e783cb626497b1ebe471e introduced a change where > org-babel-script-escape stopped accepting numbers. This caused an issue in > ob-ruby.el where when trying to evaluate something like "2 + 2", you would > get the message: > > `org-babel-script-escape' expects a string > > This broke evaluation of Ruby code blocks. > > I suspect this is not the only location where this problem might > arise, Perhaps ob-ruby.el is to blame. #+begin_src ruby 2 + 2 #+end_src The above snippet calls org-babel-script-escape twice: first with "4" and then with 4. The first one happens with the org-babel-ruby-evaluate call (which leads to an org-babel-ruby-table-or-string call) in org-babel-execute:ruby and the second happens with the direct call to org-babel-ruby-table-or-string in org-babel-execute:ruby. Is the results-params check and call to org-babel-ruby-table-or-string in org-babel-ruby-evaluate needed? It seems like org-babel-execute already covers this processing. -- Kyle