Sha256: 4edb12a99772fe858869ba3d1b60e51c5715586243d30f3078a2e444e72b6dae

Contents?: true

Size: 462 Bytes

Versions: 11

Compression:

Stored size: 462 Bytes

Contents

class Fancy
  class AST
    class StringLiteral < Rubinius::AST::StringLiteral
      def initialize(line, str)
        super(line, unescape_chars(str))
      end

      def unescape_chars(str)
        str.gsub("\\r", "\r").gsub("\\t", "\t").gsub("\\n", "\n").gsub("\\v", "\v").gsub("\\b", "\b").
          gsub("\\f", "\f").gsub("\\a", "\a").gsub("\\\\", "\\").gsub("\\?", "\?").gsub("\\'", "\'").gsub('\\"', '\"').gsub("\\\"", "\"")
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fancy-0.10.0 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.9.0 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.8.0 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.7.0 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.6.0 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.5.0 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.4.0 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.3.3 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.3.2 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.3.1 boot/rbx-compiler/compiler/ast/string_literal.rb
fancy-0.3.0 boot/rbx-compiler/compiler/ast/string_literal.rb