Sha256: bafc967b0137a2c37cd0b65713b14a8ccea5a16d3fa78d68371dd8d4bffce747

Contents?: true

Size: 174 Bytes

Versions: 28

Compression:

Stored size: 174 Bytes

Contents

class String
  
  # Ruby 1.8 reports methods as strings,
  # whereas 1.9 reports them as symbols
  def to_method_name
    RUBY_VERSION =~ /^1.8/ ? self : to_sym
  end
  
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
dragonfly-0.5.6 lib/dragonfly/core_ext/string.rb
dragonfly-0.5.5 lib/dragonfly/core_ext/string.rb
dragonfly-0.5.4 lib/dragonfly/core_ext/string.rb
dragonfly-0.5.3 lib/dragonfly/core_ext/string.rb
dragonfly-0.5.2 lib/dragonfly/core_ext/string.rb
dragonfly-0.5.1 lib/dragonfly/core_ext/string.rb
dragonfly-0.5.0 lib/dragonfly/core_ext/string.rb
dragonfly-0.4.4 lib/dragonfly/core_ext/string.rb