type_struct 0.7.3 → 0.7.4

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: 4c4980fad4adaa9e864b7e7d61b4561687b945a6
4
- data.tar.gz: 69fc7fbad59d06eba7033574877a5cd3f29d162a
3
+ metadata.gz: 3f4ff48a19c9ef6d1a18f5c197856c33e865cc67
4
+ data.tar.gz: 86382480bbd65dc827b9e259e24451ca1dc1b7a9
5
5
  SHA512:
6
- metadata.gz: cb6f91c7ab75daa59bbe963ed1402a7ca40967923cbddf9ff3d28be8cb21f4c5f5f59c80ea6be0bf911c4cfc014002ff05922bcd42c55dae807a9853363e0657
7
- data.tar.gz: 60c49aee26de2c1269ce60d92ba15d7ec53ff13d22b843d340ef468e4346de2bdc555d33e34a1cb8dd4457ea08285b2206d133d9b8e3355db6bda54e57334b70
6
+ metadata.gz: a22518962d818fed9ce7df5706cbebb0c00a0133889470a170b22558b8ae30ceeede2cbd0f6702d9c454fac997caed00aef68f21e1d2ca17d1b4dd6664ac93c8
7
+ data.tar.gz: 71a68dd3f400725a002c9e4ea3397125548c3f309053f9055cb8528fdbbe5f45955bcdac616fe2312299ba6de0d46d4d1aa1362e6b662011770da4d3dcaecafc
@@ -17,7 +17,12 @@ class TypeStruct
17
17
  b = e.backtrace_locations.find do |b|
18
18
  b.absolute_path !~ THIS_LIB_REGEXP
19
19
  end
20
- relative_path = Pathname.new(b.absolute_path).relative_path_from(PWD)
20
+ pathname = Pathname.new(b.absolute_path)
21
+ relative_path = if pathname.absolute? && PWD.absolute?
22
+ pathname.relative_path_from(PWD)
23
+ else
24
+ b.absolute_path
25
+ end
21
26
  "#{relative_path}:#{b.lineno}:in #{e.class} #{e}"
22
27
  }.join("\n")
23
28
  end
@@ -47,7 +47,7 @@ class TypeStruct
47
47
  parse(type_struct, value)
48
48
  type_struct
49
49
  end
50
- when Fixnum, Bignum
50
+ when Integer
51
51
  "Integer"
52
52
  when NilClass
53
53
  "Object"
@@ -1,3 +1,3 @@
1
1
  class TypeStruct
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{_test.rb}) }
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_development_dependency "bundler", "~> 1.10"
21
- spec.add_development_dependency "rake", "~> 10.0"
20
+ spec.add_development_dependency "bundler"
21
+ spec.add_development_dependency "rake"
22
22
  spec.add_development_dependency "rgot"
23
23
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: type_struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-10 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.10'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rgot
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.4.5.1
100
+ rubygems_version: 2.6.8
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Pseudo type system on struct.