# Ruby

To use this language, use the class "language-ruby".

## Single-line comments

    # This is a comment

## Strings

    "foo \"bar\" baz"
    'foo \'bar\' baz'

## Regular expressions

    /foo?[ ]*bar/

## Variables

    $foo = 5;
    class InstTest
      def set_foo(n)
        @foo = n
      end
      def set_bar(n)
        @bar = n
      end
    end

## Symbols

    mystring = :steveT;

## String Interpolation

    "foo #{'bar'+my_variable}"

## Known failures

There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter. However, Prism dares to be open and honest about them. If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.

### Comments that look like interpolation shows as ruby code

    #{my_var}

### Comment-like substrings

    "foo # bar";

### Two quotes of the same type (i.e. both single or both double) inside a regex

    /"foo"/;

### Multi-line comments are not supported

    =begin
    ************************
    This is a comment block
    ************************
    =end