Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use context instead of nested its to fix breaking changes in Crystal .27.1 #202

Merged
merged 2 commits into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
crystal 0.27.0
crystal 0.27.2
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: myst
version: 0.6.2
crystal: 0.27.0
crystal: 0.27.2
license: MIT
authors:
- Jon Egeland <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion spec/interpreter/nodes/op_assign_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe "Interpreter - OpAssign" do
itr.errput.to_s.downcase.should match(/no variable or method `a`/)
end

it "does not allow re-assignment to constants" do
context "does not allow re-assignment to constants" do
it_does_not_interpret %Q(
THING = 1
THING #{op} 2
Expand Down
2 changes: 1 addition & 1 deletion spec/interpreter/nodes/require_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Dir.cd(__DIR__) do
itr.stack.pop.should eq(val(true))
end

it "must be given a String value as a path" do
context "must be given a String value as a path" do
it_does_not_interpret %q(
require true
)
Expand Down
2 changes: 1 addition & 1 deletion spec/interpreter/nodes/simple_assign_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe "Interpreter - SimpleAssign" do
interpreter.current_scope["THING"].should eq(val(2))
end

it "does not allow re-assignment to constants" do
context "does not allow re-assignment to constants" do
it_does_not_interpret %q(
THING = 1
THING = 2
Expand Down
6 changes: 3 additions & 3 deletions spec/interpreter/nodes/unary_ops_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ require "../../support/nodes.cr"
require "../../support/interpret.cr"

describe "Interpreter - OpUnary" do
it "handle negation for integers" do
context "handle negation for integers" do
it_interprets %q(a = 2 + -1; a), [val(1)]
it_interprets %q(a = -2 + -1;), [val(-3)]
it_interprets %q(a = -2; -a), [val(2)]
end

it "handle negation for floats" do
context "handle negation for floats" do
it_interprets %q(-2.23 + 1), [val(-1.23)]
it_interprets %q(-2.23 + 1.1), [val(-1.13)]
it_interprets %q(a = 2.23; -a), [val(-2.23)]
end

it "handle not for booleans" do
context "handle not for booleans" do
it_interprets %q(!true), [val(false)]
it_interprets %q(a=false; b = !a; b), [val(true)]
end
Expand Down