green_day 0.1.8 → 0.1.9

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
  SHA256:
3
- metadata.gz: 6d4fcd6e04fa4ae3036ade6e56c9557f328807ee685bcb413c22ee4b7a94c78f
4
- data.tar.gz: 521c0dc62981992d95a77dc56805443843be93177cddba94e7ec8f9b364318d7
3
+ metadata.gz: aa59fb5ccbedf8faf233f5519d89b260b6885161754a96744a28e5419b689aa7
4
+ data.tar.gz: 89c55070f70ac636b94c5259c979d5b3ea1571d68cb0dbb381177ae003558bd8
5
5
  SHA512:
6
- metadata.gz: dd1c482a33eaf080e76742d90451bd65c61434023f08fac5eeb402561acb5688693918601af56e6e9c3683f8e98a531200fe2d6ab7beb5dd417e879980941108
7
- data.tar.gz: 03430005b4f75548739cfc44bed7597a4410ab01d23997ecd39a0d1e190b517f6886e7c2be9f95d50fa67ed339cad9607b48e6be9e9acf72b94b42dbdbe51fbe
6
+ metadata.gz: 383b488e31d8b09339485ff01551e6b3fa9a940eb6ceb55991048cf64adfeb6bfacdd9af24e5be69ee1794ccd8af9fedfbe3f775d4ddb7e5fc4575b5625070d1
7
+ data.tar.gz: 74d9dc5ae1b1a1a0147cfb91918e4b85ed203cca1a21a764977e23c70da2e68ea051df8c01d1706c7424c3500bc7bde62dec1cd9cdc4313e780ad9c3b8b40506
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnippetBuilder
4
- INCREASE_STACK_SIZE_SNIPPET =
5
- "ENV[Z = 'RUBY_THREAD_VM_STACK_SIZE'] || exec( { Z => '50000000' },'ruby',$0)"
6
- MULTIPLE_LINE_INPUT_SNIPPET = 'readlines.map(&:chomp!).map { |e| e.split.map(&:to_i) }'
7
- ARRAY_INPUT_SNIPPET = 'gets.split.map(&:to_i)'
4
+ ARRAY_INPUT_SNIPPET = 'n = gets.split.map(&:to_i)'
5
+ MULTIPLE_LINE_INPUT_SNIPPET = 'array = readlines.map(&:chomp!).map { |e| e.split.map(&:to_i) }'
8
6
 
9
7
  module_function
10
8
 
11
9
  def build
12
- [INCREASE_STACK_SIZE_SNIPPET, MULTIPLE_LINE_INPUT_SNIPPET, ARRAY_INPUT_SNIPPET]
13
- .map { |snippet| '# ' + snippet }
10
+ constants
11
+ .map { |snippet| '# ' + eval(snippet.to_s) }
14
12
  .join("\n") + "\n"
15
13
  end
16
14
  end
@@ -28,7 +28,7 @@ module GreenDay
28
28
  def unify_cr_lf(string)
29
29
  return unless string # たまに画像で例を出してくるとsampleの文字がなくなる
30
30
 
31
- string&.gsub(/\R/, "\n")&.dump
31
+ string.gsub(/\R/, "\n").dump
32
32
  end
33
33
 
34
34
  def tab
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GreenDay
4
- VERSION = '0.1.8'
4
+ VERSION = '0.1.9'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: green_day
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - qwyng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-14 00:00:00.000000000 Z
11
+ date: 2020-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday