Skip to content

Commit

Permalink
version 0.6.2, temporary fix for segfault on 1.9.3
Browse files Browse the repository at this point in the history
* see here: nixme/pry-nav#4
  • Loading branch information
banister committed Feb 1, 2012
1 parent dbad3bb commit a419da3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o",

def apply_spec_defaults(s)
s.name = PROJECT_NAME
s.summary = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack. Currently only works for MRI 1.9.2."
s.summary = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack. Currently only works for MRI 1.9.2+"
s.version = BindingOfCaller::VERSION
s.date = Time.now.strftime '%Y-%m-%d'
s.author = "John Mair (banisterfiend)"
s.email = '[email protected]'
s.description = s.summary
s.require_path = 'lib'
s.add_development_dependency("bacon","~>1.1.0")
s.add_development_dependency("bacon","~>1.1")
s.homepage = "http://github.com/banister/binding_of_caller"
s.has_rdoc = 'yard'
s.required_ruby_version = '>= 1.9.2'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- test/*`.split("\n")
end
Expand Down
4 changes: 4 additions & 0 deletions ext/binding_of_caller/binding_of_caller.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ binding_mark(void *ptr)
if (ptr) {
bind = ptr;
RUBY_MARK_UNLESS_NULL(bind->env);

#ifdef RUBY_192
RUBY_MARK_UNLESS_NULL(bind->filename);
#endif

}
RUBY_MARK_LEAVE("binding");
}
Expand Down
5 changes: 2 additions & 3 deletions ext/binding_of_caller/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

case RUBY_VERSION
when /1.9.2/
$CFLAGS += " -I./ruby_headers/192/"
$CFLAGS += " -I./ruby_headers/192/ -DRUBY_192"
when /1.9.3/
puts "hit 193"
$CFLAGS += " -I./ruby_headers/193/"
$CFLAGS += " -I./ruby_headers/193/ -DRUBY_193"
end

create_makefile('binding_of_caller')
2 changes: 1 addition & 1 deletion lib/binding_of_caller/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BindingOfCaller
VERSION = "0.6.1"
VERSION = "0.6.2"
end
3 changes: 0 additions & 3 deletions test/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ def o.b
caller_bindings[2].frame_type.should == :method
end

it 'should raise when invoked on an ordinary binding (i.e one not generated through Binding#of_caller)' do
lambda { binding.frame_type }.should.raise RuntimeError
end
end
end

0 comments on commit a419da3

Please sign in to comment.