Sha256: 31f553b72d7566920364ac5a99bd79eebf04b1dc4eeaf1e627a626c8fc356423

Contents?: true

Size: 619 Bytes

Versions: 6816

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

module PryByebug
  module Helpers
    #
    # Compatibility helper to handle source location
    #
    module Location
      module_function

      #
      # Current file in the target binding. Used as the default breakpoint
      # location.
      #
      def current_file(source = target)
        # Guard clause for Ruby >= 2.6 providing now Binding#source_location ...
        return source.source_location[0] if source.respond_to?(:source_location)

        # ... to avoid warning: 'eval may not return location in binding'
        source.eval("__FILE__")
      end
    end
  end
end

Version data entries

6,816 entries across 6,812 versions & 32 rubygems

Version Path
cybrid_api_id_ruby-0.0.35 vendor/bundle/ruby/3.1.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
cybrid_api_organization_ruby-0.0.35 vendor/bundle/ruby/3.1.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
primary_connect_proto-0.9.0 vendor/bundle/ruby/2.6.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
primary_connect_proto-0.8.2 vendor/bundle/ruby/2.7.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
primary_connect_proto-0.8.1 vendor/bundle/ruby/2.7.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
primary_connect_proto-0.8.0 vendor/bundle/ruby/2.6.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha169 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha168 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha167 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha166 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha165 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-oathkeeper-client-0.38.25.beta1 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha164 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha163 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha162 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha161 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha160 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha159 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha158 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb
ory-client-0.0.1.alpha157 vendor/bundle/ruby/2.5.0/gems/pry-byebug-3.9.0/lib/pry-byebug/helpers/location.rb