brainfuck 0.1.0 → 0.1.2
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/.gemtest +0 -0
- data/.rspec +2 -0
- data/Rakefile +2 -0
- data/lib/brainfuck/version.rb +1 -1
- data/spec/brainfuck/ast_spec.rb +1 -1
- data/spec/brainfuck/interpreter_spec.rb +1 -1
- data/spec/brainfuck/parser_spec.rb +1 -1
- metadata +5 -3
data/.gemtest
ADDED
File without changes
|
data/.rspec
ADDED
data/Rakefile
CHANGED
data/lib/brainfuck/version.rb
CHANGED
data/spec/brainfuck/ast_spec.rb
CHANGED
@@ -8,7 +8,7 @@ module Brainfuck
|
|
8
8
|
describe "AST::#{node.capitalize}Node" do
|
9
9
|
subject { eval("AST::#{node.capitalize}Node").new stack }
|
10
10
|
describe "#eval" do
|
11
|
-
it
|
11
|
+
it "calls stack##{node}" do
|
12
12
|
subject.stack.should_receive(node)
|
13
13
|
subject.eval
|
14
14
|
end
|
@@ -13,7 +13,7 @@ module Brainfuck
|
|
13
13
|
|
14
14
|
describe "rules" do
|
15
15
|
%w{fwd bwd inc dec puts gets iteration exp}.each do |rule|
|
16
|
-
it
|
16
|
+
it "implements a rule for :#{rule} node" do
|
17
17
|
subject.rules.map(&:first).map do |pattern|
|
18
18
|
pattern.instance_variable_get(:@pattern)
|
19
19
|
end.map(&:keys).flatten.should include(:"#{rule}")
|
@@ -17,7 +17,7 @@ module Brainfuck
|
|
17
17
|
|
18
18
|
describe "rules" do
|
19
19
|
%w{lparen rparen space space? fwd bwd inc dec puts gets iteration expression}.each do |rule|
|
20
|
-
it
|
20
|
+
it "implements a rule for :#{rule} node" do
|
21
21
|
subject.should respond_to(:"#{rule}")
|
22
22
|
end
|
23
23
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Josep M. Bach
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-02-02 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -92,7 +92,9 @@ extensions: []
|
|
92
92
|
extra_rdoc_files: []
|
93
93
|
|
94
94
|
files:
|
95
|
+
- .gemtest
|
95
96
|
- .gitignore
|
97
|
+
- .rspec
|
96
98
|
- Gemfile
|
97
99
|
- Gemfile.lock
|
98
100
|
- Rakefile
|