vernacular 0.1.0 → 0.1.1

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: be3b65d96dd405422c5d5723be0aea18e1aca5c8
4
- data.tar.gz: 3f70cac82ad0ce35054d2b3289b4dc612b0da9a7
3
+ metadata.gz: 69c7a680b5b3bb074f6e71ac41951fee4b8bd742
4
+ data.tar.gz: c4c41d1c663a06d7d123e02eb9143e7cf2e40fda
5
5
  SHA512:
6
- metadata.gz: a640f138ed4496de8f88f13a2c9e7820c6a92ce2ebbc7e5a1e153a17fbe302c841e934bd6cc2969b3c3a9a577b74aa5e3cfd1881fbe1a94c951f40a3e8f37132
7
- data.tar.gz: 7f66305aabfacb753d8b79fc20d9a07647546063964aa330c02fa2653b56c008214f284588c70d58ba7d93b65b07409c94a7e358600b67de97025538d7cb0a02
6
+ metadata.gz: 4e3c75c0048da7ca9b78b58a85c2ddb286dda0080895d530aeee52d1fbd0a55ffb3bba84f643f31b5b9ba9579aea6ab91478f8cb525da6056b5a693a31a12137
7
+ data.tar.gz: 419fd4ad67834bb9def1a26efc960752a82e32ce9ab28e513e7160e7ffe5e9d8cddc70f06fd499f0cab41054f038496cc40a6d2c1e3ae78f1ae1d26916b86656
@@ -86,7 +86,7 @@ module Vernacular
86
86
 
87
87
  def install
88
88
  @installed ||=
89
- if defined?(Bootsnap)
89
+ if defined?(Bootsnap) && using_bootsnap_compilation?
90
90
  class << Bootsnap::CompileCache::ISeq
91
91
  prepend ::Vernacular::BootsnapMixin
92
92
  end
@@ -96,5 +96,12 @@ module Vernacular
96
96
  end
97
97
  end
98
98
  end
99
+
100
+ def using_bootsnap_compilation?
101
+ filepath, = RubyVM::InstructionSequence.method(:load_iseq).source_location
102
+ filepath =~ %r{/bootsnap/}
103
+ rescue NameError
104
+ false
105
+ end
99
106
  end
100
107
  end
@@ -1,3 +1,3 @@
1
1
  module Vernacular
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vernacular
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
  - Kevin Deisz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-12 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.6.13
146
+ rubygems_version: 2.6.11
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Allows extending ruby's syntax and compilation process