Sha256: 3004012912d52b4fb1a432ba72bf41a966a8a769d5266edc3d3b1c751d183d42

Contents?: true

Size: 327 Bytes

Versions: 20

Compression:

Stored size: 327 Bytes

Contents

module Ruby2JS
  class Converter

    # (xstr
    #   (str 'a'))

    handle :xstr do |*children|
      if @binding
        str = eval capture { parse_all(*children) }
        puts @binding.eval(str).to_s
      else
        raise SecurityError.new('Insecure operation, eval without binding option')
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ruby2js-5.1.1 lib/ruby2js/converter/xstr.rb
ruby2js-5.1.0 lib/ruby2js/converter/xstr.rb
ruby2js-5.0.1 lib/ruby2js/converter/xstr.rb
ruby2js-5.0.0 lib/ruby2js/converter/xstr.rb
ruby2js-4.2.2 lib/ruby2js/converter/xstr.rb
ruby2js-4.2.1 lib/ruby2js/converter/xstr.rb
ruby2js-4.2.0 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.7 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.6 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.5 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.4 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.3 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.2 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.1 lib/ruby2js/converter/xstr.rb
ruby2js-4.1.0 lib/ruby2js/converter/xstr.rb
ruby2js-4.0.5 lib/ruby2js/converter/xstr.rb
ruby2js-4.0.4 lib/ruby2js/converter/xstr.rb
ruby2js-4.0.3 lib/ruby2js/converter/xstr.rb
ruby2js-4.0.2 lib/ruby2js/converter/xstr.rb
ruby2js-4.0.1 lib/ruby2js/converter/xstr.rb