mathcha 0.4.6 → 0.4.7
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/VERSION +1 -1
- data/lib/mathcha/mathcha_helper.rb +3 -0
- data/mathcha.gemspec +2 -1
- data/pkg/mathcha-0.4.6.gem +0 -0
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.7
|
@@ -55,6 +55,9 @@ module Mathcha
|
|
55
55
|
op1 = rand(seed1)
|
56
56
|
op2 = rand(seed2)
|
57
57
|
|
58
|
+
# want to bail on division by zero, just cut it off.
|
59
|
+
return [nil, nil] if (op == DIV and op2 == 0)
|
60
|
+
|
58
61
|
sol = eval(eq = "#{op1.to_f} #{op} #{op2.to_f}")
|
59
62
|
sol = (sol == sol.floor) ? sol.to_i : sol
|
60
63
|
|
data/mathcha.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mathcha}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Cory Wilkerson"]
|
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
|
|
33
33
|
"pkg/mathcha-0.4.3.gem",
|
34
34
|
"pkg/mathcha-0.4.4.gem",
|
35
35
|
"pkg/mathcha-0.4.5.gem",
|
36
|
+
"pkg/mathcha-0.4.6.gem",
|
36
37
|
"rails/init.rb",
|
37
38
|
"tasks/mathcha_tasks.rake",
|
38
39
|
"test/mathcha_test.rb",
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mathcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cory Wilkerson
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- pkg/mathcha-0.4.3.gem
|
40
40
|
- pkg/mathcha-0.4.4.gem
|
41
41
|
- pkg/mathcha-0.4.5.gem
|
42
|
+
- pkg/mathcha-0.4.6.gem
|
42
43
|
- rails/init.rb
|
43
44
|
- tasks/mathcha_tasks.rake
|
44
45
|
- test/mathcha_test.rb
|