summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/iotas/door.rb4
-rw-r--r--spec/board_spec.rb3
-rw-r--r--spec/door_spec.rb3
3 files changed, 1 insertions, 9 deletions
diff --git a/lib/iotas/door.rb b/lib/iotas/door.rb
index de6b5a0..7d57b1c 100644
--- a/lib/iotas/door.rb
+++ b/lib/iotas/door.rb
@@ -43,9 +43,7 @@ module Iotas
end
#
def require_p p_kls
- p = @spin.require_p p_kls
- p.init! self
- p
+ @spin.require_p p_kls
end
#
def release_p p
diff --git a/spec/board_spec.rb b/spec/board_spec.rb
index d549530..0499778 100644
--- a/spec/board_spec.rb
+++ b/spec/board_spec.rb
@@ -17,13 +17,10 @@ describe Iotas::Board do
it "require_p release_p" do
board = Iotas::Board.new 'hell', @spin
p0 = board.require_p Iotas::Particle
- p0.src.should be board
p1 = board.require_p Iotas::Particle
- p1.src.should be board
(p0===p1).should be_false
board.release_p p0
p2 = board.require_p Iotas::Particle
- p2.src.should be board
(p0===p2).should be_true
end
#
diff --git a/spec/door_spec.rb b/spec/door_spec.rb
index b836786..43b98a1 100644
--- a/spec/door_spec.rb
+++ b/spec/door_spec.rb
@@ -17,13 +17,10 @@ describe Iotas::Door do
it "require_p release_p" do
door = Iotas::Door.new 'hell', @spin
p0 = door.require_p Iotas::Particle
- p0.src.should be door
p1 = door.require_p Iotas::Particle
- p1.src.should be door
(p0===p1).should be_false
door.release_p p0
p2 = door.require_p Iotas::Particle
- p2.src.should be door
(p0===p2).should be_true
end
#