   "Execute a block of Ruby code with Babel.
 This function is called by `org-babel-execute-src-block'."
   (let* ((session (org-babel-arql-initiate-session
-		   (cdr (assq :session params))))
+		   (cdr (assq :session params)) params))
          (result-params (cdr (assq :result-params params)))
          (result-type (cdr (assq :result-type params)))
          (full-body (org-babel-expand-body:generic

(defun org-babel-prep-session:arql (session params)
  "Prepare SESSION according to the header arguments specified in PARAMS."
  ;; (message "params=%S" params) ;; debugging
  (let* ((session (org-babel-arql-initiate-session session))
         (var-lines (org-babel-variable-assignments:arql params)))
    (org-babel-comint-in-buffer session
      (sit-for .5) (goto-char (point-max))

                res)
      res)))

(defun org-babel-arql-initiate-session (&optional session params)
  "Initiate a ruby session.
If there is not a current inferior-process-buffer in SESSION
then create one.  Return the initialized session."
  (unless (string= session "none")
    (require 'inf-ruby)
    (let* ((options (cdr (assoc :options params)))
           (cmd (format "%s %s"(cdr (assoc "arql" inf-ruby-implementations)) options))
           ;; (buffer (get-buffer (format "*%s*" session)))
           (buffer (get-buffer (buffer-name inf-ruby-buffer)))
	   (session-buffer (or buffer (save-window-excursion
					(run-ruby cmd session)
