ru 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e484ed43d01e2c22efe5fef97a9fcc5850a2570
4
- data.tar.gz: 9974ca32575573b83ebdecc453dfc6a57b626d3d
3
+ metadata.gz: 2be498d7e0b3f6a89f4a6261ba2c963133528baa
4
+ data.tar.gz: 1d083751f8bdd16571f5977200cc2f1012caaf6a
5
5
  SHA512:
6
- metadata.gz: 07aa4a4102fce55f57e8f0da59a9b8f4d5fb97258913b26fd227e3815b2ee43e4407e77012fc94c1fc2b4f67d3325a9a2c27c7eb3d4826faeaf4f202e9dfa10f
7
- data.tar.gz: 94ea845efdf2ab6b1eab27dfcd62f031bf15d5a87cee35e0fbff92f83f8796589f63f56fd8ad06ba6e043022132f6f893bdaf50b5d53f7a434a9ed63d5e4e860
6
+ metadata.gz: 2081ee65f4e563226199d8bf30de16d2363a17c8f38e000ea95be9c5fd799e7e562eea16d094aa279c6727c401ca334d724b12c3174e76497891844fc5a0b730
7
+ data.tar.gz: a2a5c7a2bd52a3e0c9db71162634f4125047d6ee2163f16f8a17ba7416d45364d64336c03783b270d0875e8bcecd1bb1f3fe134e2af5590d60712070cb708d64
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- ru (0.1.3)
4
+ ru (0.1.4)
5
5
  activesupport (>= 3.2.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- ru (0.1.3)
4
+ ru (0.1.4)
5
5
  activesupport (>= 3.2.0)
6
6
 
7
7
  GEM
@@ -50,7 +50,12 @@ module Ru
50
50
  @stdin = get_stdin(args) unless @code.start_with?('! ')
51
51
  @code = prepare_code(@code) if @code
52
52
 
53
- lines = @stdin.present? ? @stdin.split("\n") : []
53
+ lines = []
54
+ unless @stdin.nil?
55
+ # Prevent 'invalid byte sequence in UTF-8'
56
+ @stdin.encode!('UTF-8', 'UTF-8', :invalid => :replace)
57
+ lines = @stdin.split("\n")
58
+ end
54
59
  array = Ru::Array.new(lines)
55
60
  output = array.instance_eval(@code) || @stdin
56
61
  output = prepare_output(output)
@@ -1,3 +1,3 @@
1
1
  module Ru
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Benner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2015-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport