Sha256: 90e8c497210e71e1080fcae85d747d351510a148b5654929d2f2934dcc0a8149

Contents?: true

Size: 511 Bytes

Versions: 7

Compression:

Stored size: 511 Bytes

Contents

require 'did_you_mean'

module DidYouMean
  TRACE = TracePoint.trace(:raise) do |tp|
    e = tp.raised_exception

    if SPELL_CHECKERS.include?(e.class.to_s) && !e.instance_variable_defined?(:@frame_binding)
      e.instance_variable_set(:@frame_binding, tp.binding)
    end
  end

  NameError.send(:attr, :frame_binding)
end

require 'did_you_mean/experimental/initializer_name_correction'
require 'did_you_mean/experimental/ivar_name_correction'
require 'did_you_mean/experimental/key_error_name_correction'

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
did_you_mean-1.1.3 lib/did_you_mean/experimental.rb
did_you_mean-1.0.4 lib/did_you_mean/experimental.rb
did_you_mean-1.0.3 lib/did_you_mean/experimental.rb
did_you_mean-1.1.2 lib/did_you_mean/experimental.rb
ruby-compiler-0.1.1 vendor/ruby/gems/did_you_mean-1.1.0/lib/did_you_mean/experimental.rb
did_you_mean-1.1.0 lib/did_you_mean/experimental.rb
did_you_mean-1.0.2 lib/did_you_mean/experimental.rb