Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

"rake pry" runs whereami on startup on rbx and jruby #395

Closed
ConradIrwin opened this Issue Dec 28, 2011 · 2 comments

Comments

Projects
None yet
2 participants
Owner

ConradIrwin commented Dec 28, 2011

29362:/0/ruby/pry[master].$ rvm ree-1.8.7 do rake pry
[1] pry(main)> 
29363:/0/ruby/pry[master].$ rvm rbx do rake pry

From: /0/ruby/pry/pry.gemspec @ line 1:

 =>  1: # -*- encoding: utf-8 -*-
     2: 
     3: Gem::Specification.new do |s|
     4:   s.name = "pry"
     5:   s.version = "0.9.8pre2"
     6: 
[1] pry(main)> 
Owner

rf- commented Dec 29, 2011

This is clearly my fault. I have no idea how though. I'll look into it.

@rf- rf- added a commit that referenced this issue Dec 29, 2011

@rf- rf- add workaround for issue #395 22ae454
Owner

rf- commented Dec 29, 2011

This is a weird one. JRuby and Rubinius apparently have a bug where eval str, TOPLEVEL_BINDING, filename sets __FILE__ in TOPLEVEL_BINDING to filename for a while. By the time the prompt shows up, __FILE__ has the correct value, but at the point whereami checks its context, it's still set to the last gemspec that Bundler evaled internally.

@rf- rf- closed this Dec 29, 2011

@rf- rf- added a commit that referenced this issue Dec 29, 2011

@rf- rf- better choice of __FILE__ (see issue #395) cfe5515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment