static_source_loc 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/static_source_loc.rb +6 -4
  2. metadata +1 -2
  3. data/lib/wut.rb +0 -1
@@ -3,7 +3,7 @@ require 'find'
3
3
  require 'ruby_parser'
4
4
 
5
5
  module StaticSourceLoc
6
- VERSION = '0.0.1'
6
+ VERSION = '0.1.0'
7
7
 
8
8
  SourceLoc = Struct.new :file, :line
9
9
 
@@ -87,9 +87,11 @@ module StaticSourceLoc
87
87
  when :block
88
88
  sexpr.values.each &method(:process_code)
89
89
  when :class, :module
90
- new_submodule(sexpr[1]).
91
- new_loc(sexpr.file, sexpr.line).
92
- process_code(s(:block).concat sexpr.drop(3))
90
+ if sexpr[1].is_a? Symbol
91
+ new_submodule(sexpr[1]).
92
+ new_loc(sexpr.file, sexpr.line).
93
+ process_code(s(:block).concat sexpr.drop(3))
94
+ end
93
95
  when :sclass
94
96
  if sexpr[1] == s(:self)
95
97
  singleton_class.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: static_source_loc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -36,7 +36,6 @@ files:
36
36
  - LICENSE
37
37
  - README.md
38
38
  - lib/static_source_loc.rb
39
- - lib/wut.rb
40
39
  homepage: http://rubygems.org/gems/static_source_loc
41
40
  licenses:
42
41
  - GPL
data/lib/wut.rb DELETED
@@ -1 +0,0 @@
1
- [