Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/bson/environment.rb

Overview

Making string in 1.8 respond like a 1.9 string, without any modifications.

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#chrObject

Simply return the string when asking for it’s character.

Since:

  • 2.0.0



89
# File 'lib/bson/environment.rb', line 89

def chr; self; end

#encodeObject

Encode the string as the provided type. NOOP.

Since:

  • 2.0.0



99
# File 'lib/bson/environment.rb', line 99

def encode(*); self; end

#encode!Object

Encode the string in place. NOOP.

Since:

  • 2.0.0



104
# File 'lib/bson/environment.rb', line 104

def encode!(*); self; end

#force_encodingObject

Force the string to the provided encoding. NOOP.

Since:

  • 2.0.0



94
# File 'lib/bson/environment.rb', line 94

def force_encoding(*); self; end