getsource 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +2 -0
  2. data/Rakefile +1 -1
  3. data/lib/getsource.rb +10 -2
  4. metadata +4 -4
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 0.2.1: Fixed bug when trying to obtain source information for C methods in ruby 1.9 (reported by der-flo)
2
+
1
3
  0.2.0: Implemented getsource methods in pure ruby for ruby 1.9 using source_location
2
4
 
3
5
  0.1.0: implemented getsource with code extracted from rallhook
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'rake/gempackagetask'
6
6
 
7
7
  spec = Gem::Specification.new do |s|
8
8
  s.name = 'getsource'
9
- s.version = '0.2.0'
9
+ s.version = '0.2.1'
10
10
  s.author = 'Dario Seminara'
11
11
  s.email = 'robertodarioseminara@gmail.com'
12
12
  s.platform = Gem::Platform::RUBY
@@ -37,7 +37,11 @@ class Method
37
37
  instance_method("body")
38
38
  rescue
39
39
  def body
40
- Method::Node.new(source_location[0], source_location[1])
40
+ if source_location
41
+ Method::Node.new(source_location[0], source_location[1])
42
+ else
43
+ Method::Node.new("",0)
44
+ end
41
45
  end
42
46
  end
43
47
  end
@@ -47,7 +51,11 @@ class UnboundMethod
47
51
  instance_method("body")
48
52
  rescue
49
53
  def body
50
- Method::Node.new(source_location[0], source_location[1])
54
+ if source_location
55
+ Method::Node.new(source_location[0], source_location[1])
56
+ else
57
+ Method::Node.new("",0)
58
+ end
51
59
  end
52
60
  end
53
61
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getsource
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dario Seminara
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-27 00:00:00 -03:00
18
+ date: 2011-05-19 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies: []
21
21