Skip to content

Commit c705384

Browse files
myronmarstonmcmire
authored andcommitted
Add missing stdlib requires.
When using super_diff in an RSpec suite that does not load `set` or `delegate` from the standard library, I was getting errors: * `NameError: uninitialized constant SuperDiff::RecursionGuard::Set` * `NameError: uninitialized constant SuperDiff::OperationTrees::SimpleDelegator` The requires added here fix these errors. super_diff should load all parts of the stdlib it uses rather than assuming other things load them.
1 parent 4e4c691 commit c705384

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/super_diff/operation_trees/base.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'delegate'
2+
13
module SuperDiff
24
module OperationTrees
35
class Base < SimpleDelegator

lib/super_diff/recursion_guard.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'set'
2+
13
module SuperDiff
24
module RecursionGuard
35
RECURSION_GUARD_KEY = "super_diff_recursion_guard_key".freeze

0 commit comments

Comments
 (0)