looksee 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,51 @@
1
+ /*-*-c-*-*/
2
+ /**********************************************************************
3
+
4
+ vm_opts.h - VM optimize option
5
+
6
+ $Author: akr $
7
+
8
+ Copyright (C) 2004-2007 Koichi Sasada
9
+
10
+ **********************************************************************/
11
+
12
+
13
+ #ifndef RUBY_VM_OPTS_H
14
+ #define RUBY_VM_OPTS_H
15
+
16
+ /* Compile options.
17
+ * You can change these options at runtime by VM::CompileOption.
18
+ * Following definitions are default values.
19
+ */
20
+
21
+ #define OPT_TRACE_INSTRUCTION 1
22
+ #define OPT_TAILCALL_OPTIMIZATION 0
23
+ #define OPT_PEEPHOLE_OPTIMIZATION 1
24
+ #define OPT_SPECIALISED_INSTRUCTION 1
25
+ #define OPT_INLINE_CONST_CACHE 1
26
+
27
+
28
+ /* Build Options.
29
+ * You can't change these options at runtime.
30
+ */
31
+
32
+ /* C compiler depend */
33
+ #define OPT_DIRECT_THREADED_CODE 1
34
+ #define OPT_TOKEN_THREADED_CODE 0
35
+ #define OPT_CALL_THREADED_CODE 0
36
+
37
+ /* VM running option */
38
+ #define OPT_CHECKED_RUN 1
39
+ #define OPT_INLINE_METHOD_CACHE 1
40
+ #define OPT_BLOCKINLINING 0
41
+
42
+ /* architecture independent, affects generated code */
43
+ #define OPT_OPERANDS_UNIFICATION 0
44
+ #define OPT_INSTRUCTIONS_UNIFICATION 0
45
+ #define OPT_UNIFY_ALL_COMBINATION 0
46
+ #define OPT_STACK_CACHING 0
47
+
48
+ /* misc */
49
+ #define SUPPORT_JOKE 0
50
+
51
+ #endif /* RUBY_VM_OPTS_H */
data/ext/mri/mri.c CHANGED
@@ -1,6 +1,11 @@
1
1
  #include "ruby.h"
2
2
 
3
- #if RUBY_VERSION >= 192
3
+ #if RUBY_VERSION >= 193
4
+ # include "internal.h"
5
+ # include "vm_core.h"
6
+ # include "method.h"
7
+ # include "ruby/st.h"
8
+ #elif RUBY_VERSION >= 192
4
9
  # include "vm_core.h"
5
10
  # include "method.h"
6
11
  # include "ruby/st.h"
@@ -1,9 +1,7 @@
1
- require 'rbconfig'
2
-
3
1
  module Looksee
4
2
  module Adapter
5
3
  autoload :Base, 'looksee/adapter/base'
6
- autoload :MRI, "looksee/mri.#{Config::CONFIG['DLEXT']}"
4
+ autoload :MRI, "looksee/mri.#{Looksee::Config::CONFIG['DLEXT']}"
7
5
  autoload :JRuby, 'looksee/JRuby.jar'
8
6
  autoload :Rubinius, "looksee/adapter/rubinius"
9
7
  end
data/lib/looksee/clean.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  require "rbconfig"
2
-
3
2
  require 'set'
4
3
 
5
4
  module Looksee
5
+ Config = Object.const_defined?(:RbConfig) ? ::RbConfig : ::Config
6
+
6
7
  autoload :VERSION, 'looksee/version'
7
8
  autoload :Adapter, 'looksee/adapter'
8
9
  autoload :Columnizer, 'looksee/columnizer'
@@ -1,5 +1,5 @@
1
1
  module Looksee
2
- VERSION = [1, 0, 2]
2
+ VERSION = [1, 0, 3]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
@@ -4,7 +4,7 @@ describe Looksee::ObjectMixin do
4
4
  describe "#ls" do
5
5
  before do
6
6
  @object = Object.new
7
- Looksee.stubs(:default_specifiers).returns([:public, :overridden])
7
+ Looksee.stub(:default_specifiers).and_return([:public, :overridden])
8
8
  end
9
9
 
10
10
  it "should return an Inspector for the object's lookup path" do
@@ -5,8 +5,8 @@ describe Looksee::Inspector do
5
5
 
6
6
  describe "#inspect" do
7
7
  before do
8
- Looksee.stubs(:default_lookup_path_options).returns({})
9
- Looksee.stubs(:styles).returns(Hash.new{'%s'})
8
+ Looksee.stub(:default_lookup_path_options).and_return({})
9
+ Looksee.stub(:styles).and_return(Hash.new{'%s'})
10
10
 
11
11
  @object = Object.new
12
12
  temporary_module :M
@@ -52,7 +52,7 @@ describe Looksee::Inspector do
52
52
  end
53
53
 
54
54
  it "should columnize output to the configured default otherwise" do
55
- Looksee.stubs(:default_width).returns(20)
55
+ Looksee.stub(:default_width).and_return(20)
56
56
  inspector = Looksee::Inspector.new(@lookup_path, :visibilities => [:public])
57
57
  inspector.inspect.should == <<-EOS.demargin.chomp
58
58
  |M
@@ -159,7 +159,7 @@ describe Looksee::Inspector do
159
159
  :undefined => "~%s~",
160
160
  :overridden => "(%s)",
161
161
  }
162
- Looksee.stubs(:styles).returns(styles)
162
+ Looksee.stub(:styles).and_return(styles)
163
163
  end
164
164
 
165
165
  it "should delimit each word with the configured delimiters" do
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  ENV['LOOKSEE_METHODS'] = nil
2
2
 
3
3
  require 'rspec'
4
- require 'mocha'
5
4
  require 'looksee'
6
5
 
7
6
  require 'rbconfig'
@@ -17,7 +16,6 @@ end
17
16
  NATIVE_ADAPTER = Looksee.adapter
18
17
 
19
18
  RSpec.configure do |config|
20
- config.mock_with :mocha
21
19
  config.before { Looksee.adapter = TestAdapter.new }
22
20
  end
23
21
 
@@ -12,7 +12,7 @@ describe Looksee::WirbleCompatibility do
12
12
  |c.ls
13
13
  EOS
14
14
  code = code.chomp.gsub(/\n/, ';') # only print value of last line
15
- irb = File.join Config::CONFIG['bindir'], 'irb'
15
+ irb = File.join Looksee::Config::CONFIG['bindir'], 'irb'
16
16
  lib_dir = File.expand_path('lib')
17
17
  # irb hangs when using readline without a tty
18
18
  output = IO.popen("bundle exec #{irb} -f --noreadline --noprompt --noverbose -I#{lib_dir} 2>&1", 'r+') do |io|
@@ -21,6 +21,8 @@ describe Looksee::WirbleCompatibility do
21
21
  io.close_write
22
22
  io.read
23
23
  end
24
+ # Ruby 1.9.3 prints gc parameters if configured
25
+ nil while output.gsub!(/^(?:malloc_limit|heap_min_slots|free_min)=.*\n/, '')
24
26
  # Ruby 1.9.2 prints an extra newline on exit.
25
27
  output.chomp! if RUBY_VERSION >= '1.9.2'
26
28
  output
metadata CHANGED
@@ -1,74 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: looksee
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
4
5
  prerelease:
5
- version: 1.0.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - George Ogata
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-03-27 00:00:00 -04:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-09-05 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: ritual
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70191929244940 !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - "="
23
- - !ruby/object:Gem::Version
24
- version: 0.2.1
18
+ requirements:
19
+ - - =
20
+ - !ruby/object:Gem::Version
21
+ version: 0.3.0
25
22
  type: :development
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70191929244940
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &70191929243840 !ruby/object:Gem::Requirement
31
28
  none: false
32
- requirements:
33
- - - "="
34
- - !ruby/object:Gem::Version
29
+ requirements:
30
+ - - =
31
+ - !ruby/object:Gem::Version
35
32
  version: 2.5.0
36
33
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: mocha
40
34
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: "0"
47
- type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *70191929243840
36
+ - !ruby/object:Gem::Dependency
50
37
  name: wirble
51
- prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
38
+ requirement: &70191929243100 !ruby/object:Gem::Requirement
53
39
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
58
44
  type: :development
59
- version_requirements: *id004
45
+ prerelease: false
46
+ version_requirements: *70191929243100
60
47
  description:
61
- email:
48
+ email:
62
49
  - george.ogata@gmail.com
63
50
  executables: []
64
-
65
- extensions:
51
+ extensions:
66
52
  - ext/extconf.rb
67
- extra_rdoc_files:
53
+ extra_rdoc_files:
68
54
  - CHANGELOG
69
55
  - LICENSE
70
56
  - README.markdown
71
- files:
57
+ files:
72
58
  - lib/looksee/adapter/base.rb
73
59
  - lib/looksee/adapter/rubinius.rb
74
60
  - lib/looksee/adapter.rb
@@ -79,7 +65,6 @@ files:
79
65
  - lib/looksee/help.rb
80
66
  - lib/looksee/inspector.rb
81
67
  - lib/looksee/lookup_path.rb
82
- - lib/looksee/rbx.bundle
83
68
  - lib/looksee/shortcuts.rb
84
69
  - lib/looksee/version.rb
85
70
  - lib/looksee/wirble_compatibility.rb
@@ -93,6 +78,15 @@ files:
93
78
  - ext/mri/1.9.2/thread_pthread.h
94
79
  - ext/mri/1.9.2/vm_core.h
95
80
  - ext/mri/1.9.2/vm_opts.h
81
+ - ext/mri/1.9.3/atomic.h
82
+ - ext/mri/1.9.3/debug.h
83
+ - ext/mri/1.9.3/id.h
84
+ - ext/mri/1.9.3/internal.h
85
+ - ext/mri/1.9.3/method.h
86
+ - ext/mri/1.9.3/node.h
87
+ - ext/mri/1.9.3/thread_pthread.h
88
+ - ext/mri/1.9.3/vm_core.h
89
+ - ext/mri/1.9.3/vm_opts.h
96
90
  - ext/mri/env-1.8.h
97
91
  - ext/mri/eval_c-1.8.h
98
92
  - ext/mri/node-1.9.h
@@ -112,35 +106,31 @@ files:
112
106
  - spec/support/temporary_classes.rb
113
107
  - spec/support/test_adapter.rb
114
108
  - spec/wirble_compatibility_spec.rb
115
- has_rdoc: true
116
109
  homepage: http://github.com/oggy/looksee
117
110
  licenses: []
118
-
119
111
  post_install_message:
120
112
  rdoc_options: []
121
-
122
- require_paths:
113
+ require_paths:
123
114
  - lib
124
- required_ruby_version: !ruby/object:Gem::Requirement
115
+ required_ruby_version: !ruby/object:Gem::Requirement
125
116
  none: false
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- version: "0"
130
- required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
122
  none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- version: "0"
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
136
127
  requirements: []
137
-
138
128
  rubyforge_project:
139
- rubygems_version: 1.6.2
129
+ rubygems_version: 1.8.6
140
130
  signing_key:
141
131
  specification_version: 3
142
132
  summary: Supercharged method introspection in IRB.
143
- test_files:
133
+ test_files:
144
134
  - spec/adapter_spec.rb
145
135
  - spec/columnizer_spec.rb
146
136
  - spec/core_ext_spec.rb
Binary file