Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The script, stripped to its bare essentials, is basically a stand-in for the 'pry' executable:
- $ cat mypry
- #!/usr/bin/env ruby
- require 'rubygems'
- require 'pry'
- binding.pry
- When run directly, it works beautifully.
- $ ruby ./mypry
- From: ./mypry @ line 4 in Object#N/A:
- 1: #!/usr/bin/env ruby
- 2: require 'rubygems'
- 3: require 'pry'
- => 4: binding.pry
- 5:
- pry(main)>
- When run via load() after rubygems, boom:
- $ ruby -rubygems -e 'load("./mypry")'
- /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/default_commands/context.rb:148:in `to_s': NULL pointer given (ArgumentError)
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/default_commands/context.rb:148
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/command_set.rb:17:in `instance_exec'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/command_set.rb:17:in `call'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/command_set.rb:194:in `run_command'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/command_processor.rb:166:in `execute_command'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/command_processor.rb:139:in `process_commands'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/pry_instance.rb:301:in `process_line'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry.rb:15
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/pry_instance.rb:109:in `call'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/pry_instance.rb:109:in `exec_hook'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/pry_instance.rb:140:in `repl_prologue'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/pry_instance.rb:173:in `repl'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/pry_class.rb:95:in `start'
- from /usr/lib/ruby/gems/1.8/gems/pry-0.9.5/lib/pry/core_extensions.rb:20:in `pry'
- from ./mypry:4
- from -e:1:in `load'
- from -e:1
Add Comment
Please, Sign In to add comment