opal/corelib/marshal/read_buffer.rb
# Reads and returns Regexp from an input stream
#
# @example
#   r = /regexp/mix
# is encoded as
#   '/', 'regexp', r.options.chr
#
Reads and returns Regexp from an input stream
Reads and returns Regexp from an input stream
def read_regexp
      string = read_string(cache: false)
      options = read_byte
      result = Regexp.new(string, options)
      @object_cache << result
      result
    end
def read_regexp string = read_string ( cache : false ) options = read_byte result = Regexp . new ( string , options ) @object_cache << result result end
Reads and returns Regexp from an input stream
Reads and returns Regexp from an input stream
example
r = /regexp/mix is encoded as '/', 'regexp', r.options.chr
r = / regexp / mix is encoded as ' / ' ' regexp ' r . options . chr