mathematical 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76b035ec15c5544af7d23d6f576db7bc631f1a99
4
- data.tar.gz: d05835bb988ace6708c9c96f5b08e3af123f9e79
3
+ metadata.gz: f22250fd0d4932da54a6e648143389c73e5832ab
4
+ data.tar.gz: 59bfe53a0e651dd30bf5297786c65b89d3c19a11
5
5
  SHA512:
6
- metadata.gz: 39d975bf3099679edf52fb1ab277f7e655482ed206a26de3a5e8ae2d93abc904bc5d0735f11789fc1c9c7378d038ba6842036b65565449bf4ad5d638e03612cd
7
- data.tar.gz: 6e2a815f25d40bb1e3cea90f626f9a3669979b8ffbc847d7ade2549a123168fb35466d682009033521ce7058e5b4da1be608a5be212e66a773c66bfdb9113d62
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
 
@@ -1,3 +1,3 @@
1
1
  module Mathematical
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -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.0
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-03 00:00:00.000000000 Z
11
+ date: 2014-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler