Top Level Namespace

Defined Under Namespace

Modules: BindingOfCaller Classes: Binding

Instance Method Summary collapse

Instance Method Details

#fake_makefileObject



1
2
3
4
5
# File 'ext/binding_of_caller/extconf.rb', line 1

def fake_makefile
  File.open(File.join(File.dirname(__FILE__), "Makefile"), "w") do |f|
    f.puts %[install:\n\techo "Nada."]
  end
end

#mri_2?Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'lib/binding_of_caller.rb', line 3

def mri_2?
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" &&
    RUBY_VERSION =~ /^2/
end

#rbx?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'ext/binding_of_caller/extconf.rb', line 12

def rbx?
  defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /rbx/
end