drab 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/drab/drab.rb +15 -8
  3. data/lib/drab/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5481db4287eb6cb52247f7168320c885184a05d6
4
- data.tar.gz: 62553e86a2b6f0dbfeb3bc313d189f26fb31d393
3
+ metadata.gz: 9c366ae218465e13f13c2c6ce48de1612af4ba3e
4
+ data.tar.gz: cbce23254a6f54562fce94113e20e454e45692b2
5
5
  SHA512:
6
- metadata.gz: f981513e4fa4ce1afc0c2f1cd61a2abaffbbb0a7b51b336615c9fd160a28518dde8ca9528f02210ecb39f3e9a339227ad1a33c9dbb9f36d19b05afb1bf674200
7
- data.tar.gz: 65854246a51b043cb837978eda03babcdb53882013a1d845795988c5e664342cbf665bd48236ab27c8fe11f0de90531f825ab1c5dc5f3142e58183221c68e0ef
6
+ metadata.gz: ec98a26a4f3235b53130ae376de0fb4fb8c65d8198866defd52298513a610402f2cc6f425c3a689ff6f9696d2c4c564cb99b2876cb4d646302b5b7315c7674ea
7
+ data.tar.gz: ec21ccae5c2dce241b45532bf831075da2f20f42c7a5b6f0299279ee8115abdb75b174fbdb25919ac71dc96cc94d28e26938c53ec1d0fa999ce926982c40124b
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # = ./drab.rb
4
4
  #
5
- # Restricted Distributed Ruby: _drab_ version 0.1.0
5
+ # Restricted Distributed Ruby: drab
6
6
  #
7
7
  # Copyright (c) 1999-2003 Masatoshi SEKI. You can redistribute it and/or
8
8
  # modify it under the same terms as Ruby.
@@ -288,25 +288,32 @@ module DRab
288
288
  return false
289
289
  end
290
290
 
291
- template.size.times do |n|
291
+ return (0...template.size).collect do |n|
292
292
  if template[n].is_a?(Array)
293
- return match_structures(template[n], target[n])
293
+ hld = match_structures(template[n], target[n])
294
+ if !hld
295
+ return [false]
296
+ else
297
+ next hld
298
+ end
294
299
  end
295
300
 
296
301
  if template[n] === target[n]
297
- return true
302
+ next true
298
303
  end
299
304
 
300
305
  if template[n].is_a?(String) and target[n].is_a?(String)
301
306
  if template[n] === "*"
302
- return true
307
+ next true
303
308
  elsif template[n].start_with?("*")
304
- return target[n].end_with?(template[n][1..-1])
309
+ next target[n].end_with?(template[n][1..-1])
305
310
  elsif template[n].end_with?("*")
306
- return target[n].start_with?(template[n][0..-2])
311
+ next target[n].start_with?(template[n][0..-2])
312
+ else
313
+ return [false]
307
314
  end
308
315
  end
309
- end
316
+ end.inject { |t, n| t and n }
310
317
  rescue Exception => e
311
318
  STDERR.puts e
312
319
  STDERR.puts e.backtrace
@@ -1,3 +1,3 @@
1
1
  module DRab
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masatoshi SEKI
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-09-16 00:00:00.000000000 Z
12
+ date: 2018-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: marshal-structure
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.6.11
120
+ rubygems_version: 2.5.2
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Make DRb great again!