mathematical 0.4.0 → 0.4.1
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.
- checksums.yaml +4 -4
- data/ext/mathematical/mathematical.c +3 -0
- data/lib/mathematical/version.rb +1 -1
- data/test/mathematical/basic_test.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f22250fd0d4932da54a6e648143389c73e5832ab
|
4
|
+
data.tar.gz: 59bfe53a0e651dd30bf5297786c65b89d3c19a11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfb91e1efff316b761121f197eab6e55d6051a3a00cc5b387a0ab1f36c2d6c72c5ce4f74224ff9405a9a256f1479a0e00006ec703aad157214892aff716ee14e
|
7
|
+
data.tar.gz: c29e833ccc74d7390a5889a5bcc607fc34e3f291d985892f5a84dc38609fe0224dff8fe401c11ead35ffaf0f14f836dea8c502b0f87e017a8a9bd1c15fec6bcd
|
@@ -150,6 +150,9 @@ static VALUE MATHEMATICAL_process(VALUE self, VALUE rb_LatexCode) {
|
|
150
150
|
rb_hash_aset (result_hash, rb_tainted_str_new2 ("height"), INT2FIX(height_pt));
|
151
151
|
rb_hash_aset (result_hash, rb_tainted_str_new2 ("svg"), rb_iv_get(self, "@svg"));
|
152
152
|
|
153
|
+
// we need to clear out this key when attempting multiple calls. See http://git.io/i1hblQ
|
154
|
+
rb_iv_set(self, "@svg", Qnil);
|
155
|
+
|
153
156
|
return result_hash;
|
154
157
|
}
|
155
158
|
|
data/lib/mathematical/version.rb
CHANGED
@@ -6,4 +6,11 @@ class Mathematical::BasicTest < Test::Unit::TestCase
|
|
6
6
|
assert Mathematical::VERSION
|
7
7
|
end
|
8
8
|
|
9
|
+
def test_multiple_calls
|
10
|
+
render = Mathematical::Render.new
|
11
|
+
render.render('$\pi$')
|
12
|
+
output = render.render('$\pi$')['svg']
|
13
|
+
assert_equal 1, output.scan(/<svg/).size, 'should only contain one svg'
|
14
|
+
end
|
15
|
+
|
9
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mathematical
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|