ideone 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/ideone.rb +1 -2
  2. data/test/basic.rb +7 -1
  3. metadata +3 -3
@@ -2,7 +2,6 @@ require 'json'
2
2
  require 'net/http'
3
3
  require 'cgi'
4
4
 
5
-
6
5
  module Ideone
7
6
 
8
7
  class IdeoneError < StandardError; end
@@ -98,7 +97,7 @@ module Ideone
98
97
  else
99
98
  out = res['inouterr'].match(/<label>output:<\/label>.*?<pre.*?>(.*?)<\/pre>/m)
100
99
  if out
101
- out[1]
100
+ CGI.unescape_html out[1]
102
101
  end
103
102
  end
104
103
  end
@@ -35,6 +35,12 @@ describe 'an ideone gem user' do
35
35
  it "can submit Ruby code that doesn't print anything to stdout" do
36
36
  paste_id = Ideone.submit( :ruby, %{1+1} )
37
37
  results = Ideone.run( paste_id, nil )
38
- results.should.equal nil
38
+ results.should.be.nil
39
+ end
40
+
41
+ it 'can submit Ruby code and receive stdout that has characters that would get HTML escaped' do
42
+ paste_id = Ideone.submit( :ruby, %{p '1 < 2'} )
43
+ results = Ideone.run( paste_id, nil )
44
+ results.should.equal %{"1 < 2"\n}
39
45
  end
40
46
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ideone
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 59
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 1
10
- version: 0.8.1
9
+ - 2
10
+ version: 0.8.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pistos