Class String
In: lib/mcollective/monkey_patches.rb
Parent: Object

start_with? was introduced in 1.8.7, we need to support 1.8.5 and 1.8.6

Methods

bytes   start_with?  

Public Instance methods

[Source]

    # File lib/mcollective/monkey_patches.rb, line 63
63:   def bytes(&block)
64:     # This should not be necessary, really ...
65:     require 'enumerator'
66:     return to_enum(:each_byte) unless block_given?
67:     each_byte(&block)
68:   end

[Source]

   # File lib/mcollective/monkey_patches.rb, line 4
4:   def start_with?(str)
5:     return self[0 .. (str.length-1)] == str
6:   end

[Validate]