Skip to content

Commit

Permalink
Avoid circular require when being loaded by 'pry'
Browse files Browse the repository at this point in the history
When pry starts, it auto-requires any plugins, which means that calling
require 'pry' inside pry-nav leads to a circular require warning.
  • Loading branch information
ivoanjo committed Sep 19, 2016
1 parent d33033d commit a10cd48
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## UNRELEASED

* Fix circular require warning.

## 0.2.4 (2014-06-25)

* Support Pry 0.10
Expand Down
2 changes: 1 addition & 1 deletion lib/pry-nav/commands.rb
@@ -1,4 +1,4 @@
require 'pry'
require 'pry' unless defined? Pry

module PryNav
Commands = Pry::CommandSet.new do
Expand Down
2 changes: 1 addition & 1 deletion lib/pry-nav/pry_ext.rb
@@ -1,4 +1,4 @@
require 'pry'
require 'pry' unless defined? Pry
require 'pry-nav/tracer'

class << Pry
Expand Down
1 change: 1 addition & 0 deletions lib/pry-nav/pry_remote_ext.rb
@@ -1,3 +1,4 @@
require 'pry' unless defined? Pry
require 'pry-remote'

module PryRemote
Expand Down
2 changes: 1 addition & 1 deletion lib/pry-nav/tracer.rb
@@ -1,4 +1,4 @@
require 'pry'
require 'pry' unless defined? Pry

module PryNav
class Tracer
Expand Down

0 comments on commit a10cd48

Please sign in to comment.