method_source 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -3,7 +3,8 @@ rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
5
  - ree
6
- - rbx-2.0
6
+ - rbx-18mode
7
+ - rbx-19mode
7
8
  - jruby
8
9
 
9
10
  notifications:
@@ -13,4 +14,4 @@ notifications:
13
14
 
14
15
  branches:
15
16
  only:
16
- - master
17
+ - master
data/Rakefile CHANGED
@@ -32,6 +32,12 @@ task :test do
32
32
  sh "bacon -q #{direc}/test/test.rb"
33
33
  end
34
34
 
35
+ desc "reinstall gem"
36
+ task :reinstall => :gems do
37
+ sh "gem uninstall method_source" rescue nil
38
+ sh "gem install #{direc}/pkg/method_source-#{MethodSource::VERSION}.gem"
39
+ end
40
+
35
41
  desc "Set up and run tests"
36
42
  task :default => [:test]
37
43
 
@@ -122,14 +122,14 @@ module MethodSource
122
122
  end
123
123
 
124
124
  begin
125
- klass.allocate.method(name).source_location
125
+ Object.instance_method(:method).bind(klass.allocate).call(name).source_location
126
126
  rescue TypeError
127
127
 
128
128
  # Assume we are dealing with a Singleton Class:
129
129
  # 1. Get the instance object
130
130
  # 2. Forward the source_location lookup to the instance
131
131
  instance ||= ObjectSpace.each_object(owner).first
132
- instance.method(name).source_location
132
+ Object.instance_method(:method).bind(instance).call(name).source_location
133
133
  end
134
134
  end
135
135
  end
@@ -1,3 +1,3 @@
1
1
  module MethodSource
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,44 +1,62 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: method_source
3
- version: !ruby/object:Gem::Version
4
- version: 0.7.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 4452373466457572121
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 7
9
+ - 1
10
+ version: 0.7.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - John Mair (banisterfiend)
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-01-01 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-02-29 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: bacon
16
- requirement: &70179976064580 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
25
+ requirements:
19
26
  - - ~>
20
- - !ruby/object:Gem::Version
27
+ - !ruby/object:Gem::Version
28
+ hash: 3461773182973075480
29
+ segments:
30
+ - 1
31
+ - 1
32
+ - 0
21
33
  version: 1.1.0
22
34
  type: :development
23
- prerelease: false
24
- version_requirements: *70179976064580
25
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
26
37
  name: rake
27
- requirement: &70179976063220 !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
28
40
  none: false
29
- requirements:
41
+ requirements:
30
42
  - - ~>
31
- - !ruby/object:Gem::Version
32
- version: '0.9'
43
+ - !ruby/object:Gem::Version
44
+ hash: 2854635824043747355
45
+ segments:
46
+ - 0
47
+ - 9
48
+ version: "0.9"
33
49
  type: :development
34
- prerelease: false
35
- version_requirements: *70179976063220
50
+ version_requirements: *id002
36
51
  description: retrieve the sourcecode for a method
37
52
  email: jrmair@gmail.com
38
53
  executables: []
54
+
39
55
  extensions: []
56
+
40
57
  extra_rdoc_files: []
41
- files:
58
+
59
+ files:
42
60
  - .gemtest
43
61
  - .travis.yml
44
62
  - .yardopts
@@ -54,28 +72,37 @@ files:
54
72
  - test/test_helper.rb
55
73
  homepage: http://banisterfiend.wordpress.com
56
74
  licenses: []
75
+
57
76
  post_install_message:
58
77
  rdoc_options: []
59
- require_paths:
78
+
79
+ require_paths:
60
80
  - lib
61
- required_ruby_version: !ruby/object:Gem::Requirement
81
+ required_ruby_version: !ruby/object:Gem::Requirement
62
82
  none: false
63
- requirements:
64
- - - ! '>='
65
- - !ruby/object:Gem::Version
66
- version: '0'
67
- required_rubygems_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ hash: 2002549777813010636
87
+ segments:
88
+ - 0
89
+ version: "0"
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
91
  none: false
69
- requirements:
70
- - - ! '>='
71
- - !ruby/object:Gem::Version
72
- version: '0'
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ hash: 2002549777813010636
96
+ segments:
97
+ - 0
98
+ version: "0"
73
99
  requirements: []
100
+
74
101
  rubyforge_project:
75
- rubygems_version: 1.8.10
102
+ rubygems_version: 1.8.12
76
103
  signing_key:
77
104
  specification_version: 3
78
105
  summary: retrieve the sourcecode for a method
79
- test_files:
106
+ test_files:
80
107
  - test/test.rb
81
108
  - test/test_helper.rb