Sha256: 1ff6e58818b39b4b1354e44fff32cb6f64e2a5dd22333c38ab4643fb31bbe501

Contents?: true

Size: 761 Bytes

Versions: 265

Compression:

Stored size: 761 Bytes

Contents

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'pathname'

$test_path  = "#{Pathname.new('..').expand_path}"
$iterations = 900000

if ARGV.first == 'native'
  puts "Using native Pathname"

  class Pathname
    # original segments implementation I was using with
    # the plain ruby Pathname library.
    def segments
      prefix, names = split_names(@path)
      names.unshift(prefix) unless prefix.empty?
      names.shift if names[0] == '.'
      names
    end
  end

  $iterations.times do |num|
    p        = ::Pathname.new($test_path)
    segments = p.segments
  end
else
  puts "Using FSSM::Pathname"

  require 'fssm'

  $iterations.times do |num|
    p        = FSSM::Pathname.new($test_path)
    segments = p.segments
  end
end

Version data entries

265 entries across 118 versions & 8 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/haml-3.1.4/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.5 vendor/bundle/gems/sass-3.1.15/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.5 vendor/bundle/gems/haml-3.1.6/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.5 vendor/bundle/gems/haml-3.1.5/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.4 vendor/bundle/gems/haml-3.1.6/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.4 vendor/bundle/gems/sass-3.1.15/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.4 vendor/bundle/gems/haml-3.1.5/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.4 vendor/bundle/gems/haml-3.1.4/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.3 vendor/bundle/gems/sass-3.1.15/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.3 vendor/bundle/gems/haml-3.1.5/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.3 vendor/bundle/gems/haml-3.1.6/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.3 vendor/bundle/gems/haml-3.1.4/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/fssm-0.2.10/profile/prof-pathname-rubinius.rb
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/fssm-0.2.10/profile/prof-pathname-rubinius.rb
torquebox-console-0.3.0 vendor/bundle/jruby/1.9/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.2 vendor/bundle/gems/haml-3.1.4/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.2 vendor/bundle/gems/sass-3.1.15/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.2 vendor/bundle/gems/haml-3.1.5/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.2 vendor/bundle/gems/haml-3.1.6/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb
classiccms-0.7.1 vendor/bundle/gems/haml-3.1.4/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb