boca-golf 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/boca_golf/gist.rb +1 -1
- data/lib/boca_golf/version.rb +1 -1
- data/spec/gist_spec.rb +12 -0
- metadata +3 -3
data/lib/boca_golf/gist.rb
CHANGED
data/lib/boca_golf/version.rb
CHANGED
data/spec/gist_spec.rb
CHANGED
@@ -28,6 +28,18 @@ describe BocaGolf::Gist do
|
|
28
28
|
|
29
29
|
lambda { o.foo }.should raise_error(SecurityError)
|
30
30
|
end
|
31
|
+
|
32
|
+
it "allows recursion in solutions" do
|
33
|
+
o = Object.new.tap do |o|
|
34
|
+
o.extend BocaGolf::Gist.new(%{
|
35
|
+
def foo(n)
|
36
|
+
n > 0 ? foo(n - 1) : :done
|
37
|
+
end
|
38
|
+
}).safe_module
|
39
|
+
end
|
40
|
+
|
41
|
+
o.foo(1).should == :done
|
42
|
+
end
|
31
43
|
end
|
32
44
|
|
33
45
|
describe "load_from_url" do
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- David Vollbracht
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-02-08 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|