looksee 1.0.3-universal-java-1.6 → 2.0.0-universal-java-1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 075b2aead591728fdc8b291aa08ecc8c3ab50e8f
4
+ data.tar.gz: 2f6d9a819757f61c4faf1d82cb7d775391daa49e
5
+ SHA512:
6
+ metadata.gz: d4b0264e9d434570efa61d89a57fb8f11cf8f722c78a16bb7c5a3d12ea06321ed7fbc293c8a3194531d22b2456229ff1589d95af191e4a38e8c72326c2ef7124
7
+ data.tar.gz: 6dd65ddff536c2cd9ca09a615fd541bd1c1f6f8b598d6ca80a4f28fc1e53128f9671f1a5b7296046f91f82269171f81519098d97a2c395615efbdaea9027f902
data/CHANGELOG CHANGED
@@ -1,3 +1,23 @@
1
+ == 2.0.0 2014-01-01
2
+
3
+ * Support for MRI 2.1, JRuby 1.7, Rubinius 2.2.
4
+ * Looksee now only adds #ls to Object. The old way would frequently conflict
5
+ with, e.g., Rails controller conventions.
6
+
7
+ - object.edit is now object.ls.edit.
8
+ - Looksee.rename now just takes the new name for :ls.
9
+ - The LOOKSEE_METHODS env var is now LOOKSEE_METHOD, and is simply the new
10
+ name for :ls.
11
+ * Raise informative errors when #edit fails (e.g., for methods without a source
12
+ location).
13
+
14
+ == 1.1.0 2013-03-22
15
+
16
+ * Support for MRI 2.0.0.
17
+ * Support for MRI 1.9.3 with funnyfalcon's patches.
18
+ * Fix listing methods of a class with an undefined allocator (e.g. Struct).
19
+ * Updated supported rubies in README.
20
+
1
21
  == 1.0.3 2011-09-05
2
22
 
3
23
  * MRI 1.9.3 support.
data/README.markdown CHANGED
@@ -1,7 +1,7 @@
1
- # Looksee
1
+ # Looksee [![Build Status](https://travis-ci.org/oggy/looksee.png)](https://travis-ci.org/oggy/looksee)
2
2
 
3
3
  A tool for illustrating the ancestry and method lookup path of
4
- objects. Great for exploring unfamiliar codebases!
4
+ objects. Handy for exploring unfamiliar codebases.
5
5
 
6
6
  ## How
7
7
 
@@ -16,92 +16,83 @@ Pop this in your `.irbrc`:
16
16
  Now each object has a method `ls`, which shows you all its methods.
17
17
 
18
18
  irb> [].ls
19
- => BasicObject
20
- ! __send__ instance_eval singleton_method_added
21
- != equal? instance_exec singleton_method_removed
22
- == initialize method_missing singleton_method_undefined
19
+ => BasicObject
20
+ ! __send__ instance_exec singleton_method_undefined
21
+ != equal? method_missing
22
+ == initialize singleton_method_added
23
+ __id__ instance_eval singleton_method_removed
23
24
  Kernel
24
- !~ freeze puts
25
- <=> frozen? raise
26
- === gem rand
27
- =~ gem_original_require readline
28
- Array gets readlines
29
- Complex global_variables remove_instance_variable
30
- Float hash require
31
- Integer initialize_clone require_relative
32
- Rational initialize_copy respond_to?
33
- String initialize_dup respond_to_missing?
34
- URI inspect select
35
- __callee__ instance_of? send
36
- __id__ instance_variable_defined? set_trace_func
37
- __method__ instance_variable_get singleton_class
38
- ` instance_variable_set singleton_methods
39
- abort instance_variables sleep
40
- at_exit is_a? spawn
41
- autoload iterator? sprintf
42
- autoload? kind_of? srand
43
- binding lambda syscall
44
- block_given? load system
45
- caller local_variables taint
46
- catch loop tainted?
47
- class method tap
48
- clone methods test
49
- define_singleton_method nil? throw
50
- display object_id to_enum
51
- dup open to_s
52
- enum_for p trace_var
53
- eql? print trap
54
- eval printf trust
55
- exec private_methods untaint
56
- exit proc untrace_var
57
- exit! protected_methods untrust
58
- extend public_method untrusted?
59
- fail public_methods warn
60
- fork public_send y
61
- format putc
25
+ !~ frozen? puts
26
+ <=> gem raise
27
+ === gem_original_require rand
28
+ =~ gets readline
29
+ Array global_variables readlines
30
+ Complex hash remove_instance_variable
31
+ Float initialize_clone require
32
+ Integer initialize_copy require_relative
33
+ Rational initialize_dup respond_to?
34
+ String inspect respond_to_missing?
35
+ __callee__ instance_of? select
36
+ __method__ instance_variable_defined? send
37
+ ` instance_variable_get set_trace_func
38
+ abort instance_variable_set singleton_class
39
+ at_exit instance_variables singleton_methods
40
+ autoload is_a? sleep
41
+ autoload? iterator? spawn
42
+ binding kind_of? sprintf
43
+ block_given? lambda srand
44
+ caller load syscall
45
+ catch local_variables system
46
+ class loop taint
47
+ clone method tainted?
48
+ define_singleton_method methods tap
49
+ display nil? test
50
+ dup object_id throw
51
+ enum_for open to_enum
52
+ eql? p to_s
53
+ eval print trace_var
54
+ exec printf trap
55
+ exit private_methods trust
56
+ exit! proc untaint
57
+ extend protected_methods untrace_var
58
+ fail public_method untrust
59
+ fork public_methods untrusted?
60
+ format public_send warn
61
+ freeze putc
62
62
  Looksee::ObjectMixin
63
- edit ls
63
+ ls
64
64
  Object
65
- default_src_encoding oauth taguri to_yaml_properties
66
- in? patch taguri= to_yaml_style
67
- irb_binding singleton_class timeout
68
- load_if_available syck_to_yaml to_yaml
65
+ default_src_encoding irb_binding
69
66
  Enumerable
70
- all? drop_while first min select
71
- any? each_cons flat_map min_by slice_before
72
- by each_entry grep minmax sort
73
- chunk each_slice group_by minmax_by sort_by
74
- collect each_with_index include? none? take
75
- collect_concat each_with_object inject one? take_while
76
- count entries map partition to_a
77
- cycle find max reduce to_set
78
- detect find_all max_by reject zip
67
+ all? each_cons flat_map min_by slice_before
68
+ any? each_entry grep minmax sort
69
+ chunk each_slice group_by minmax_by sort_by
70
+ collect each_with_index include? none? take
71
+ collect_concat each_with_object inject one? take_while
72
+ count entries map partition to_a
73
+ cycle find max reduce to_set
74
+ detect find_all max_by reject zip
79
75
  drop find_index member? reverse_each
76
+ drop_while first min select
80
77
  Array
81
- & drop_while map! size
82
- * each pack slice
83
- + each_index permutation slice!
84
- - empty? pop sort
85
- << eql? product sort!
86
- <=> fetch push sort_by!
87
- == fill rassoc taguri
88
- [] find_index reject taguri=
89
- []= first reject! take
90
- assoc flatten repeated_combination take_while
91
- at flatten! repeated_permutation to_a
92
- clear frozen? replace to_ary
93
- collect hash reverse to_s
94
- collect! include? reverse! to_yaml
95
- combination index reverse_each transpose
96
- compact initialize rindex uniq
97
- compact! initialize_copy rotate uniq!
98
- concat insert rotate! unshift
99
- count inspect sample values_at
100
- cycle join select yaml_initialize
101
- delete keep_if select! zip
102
- delete_at last shift |
103
- delete_if length shuffle
104
- drop map shuffle!
78
+ & count hash rassoc size
79
+ * cycle include? reject slice
80
+ + delete index reject! slice!
81
+ - delete_at initialize repeated_combination sort
82
+ << delete_if initialize_copy repeated_permutation sort!
83
+ <=> drop insert replace sort_by!
84
+ == drop_while inspect reverse take
85
+ [] each join reverse! take_while
86
+ []= each_index keep_if reverse_each to_a
87
+ assoc empty? last rindex to_ary
88
+ at eql? length rotate to_s
89
+ clear fetch map rotate! transpose
90
+ collect fill map! sample uniq
91
+ collect! find_index pack select uniq!
92
+ combination first permutation select! unshift
93
+ compact flatten pop shift values_at
94
+ compact! flatten! product shuffle zip
95
+ concat frozen? push shuffle! |
105
96
 
106
97
  Methods are colored according to whether they're public, protected,
107
98
  private, undefined (using Module#undef_method), or overridden.
@@ -122,12 +113,12 @@ Or filter the list by Regexp:
122
113
  Enumerable
123
114
  to_a to_set
124
115
  Array
125
- to_a to_ary to_s to_yaml
116
+ to_a to_ary to_s to_yaml
126
117
 
127
118
  And if you want to know more about any of those methods, Looksee can
128
119
  take you straight to the source in your editor:
129
120
 
130
- > [].edit('to_set')
121
+ > [].ls.edit :to_set
131
122
 
132
123
  By default, this uses `vi`; customize it like this:
133
124
 
@@ -142,11 +133,11 @@ Enjoy!
142
133
 
143
134
  ## Support
144
135
 
145
- Looksee works with:
136
+ Looksee supports:
146
137
 
147
- * MRI/REE (>= 1.8.6)
148
- * JRuby (>= 1.5.6)
149
- * Rubinius (>= 1.2.1)
138
+ * MRI 1.9.3, 2.0, 2.1
139
+ * JRuby 1.7
140
+ * Rubinius 2.2
150
141
 
151
142
  ## Contributing
152
143
 
data/Rakefile CHANGED
@@ -7,3 +7,7 @@ else
7
7
  name = ruby_engine == 'ruby' ? 'mri' : ruby_engine
8
8
  extension :build_as => "ext/#{name}", :install_as => "lib/looksee/#{name}"
9
9
  end
10
+
11
+ task :default => [:clobber, :ext] do
12
+ sh 'bundle exec rspec -I. spec'
13
+ end
data/ext/extconf.rb CHANGED
@@ -4,7 +4,11 @@ extension = ruby_engine == 'ruby' ? 'mri' : ruby_engine
4
4
  require 'mkmf'
5
5
  $CPPFLAGS << " -DRUBY_VERSION=#{RUBY_VERSION.tr('.', '')}"
6
6
  if extension == 'mri'
7
- if RUBY_VERSION >= '1.9.3'
7
+ if RUBY_VERSION >= '2.1.0'
8
+ $CPPFLAGS << " -Imri/2.1.0"
9
+ elsif RUBY_VERSION >= '2.0.0'
10
+ $CPPFLAGS << " -Imri/2.0.0"
11
+ elsif RUBY_VERSION >= '1.9.3'
8
12
  $CPPFLAGS << " -Imri/1.9.3"
9
13
  elsif RUBY_VERSION >= '1.9.2'
10
14
  $CPPFLAGS << " -Imri/1.9.2"
@@ -0,0 +1,248 @@
1
+ /**********************************************************************
2
+
3
+ internal.h -
4
+
5
+ $Author$
6
+ created at: Tue May 17 11:42:20 JST 2011
7
+
8
+ Copyright (C) 2011 Yukihiro Matsumoto
9
+
10
+ **********************************************************************/
11
+
12
+ #ifndef RUBY_INTERNAL_H
13
+ #define RUBY_INTERNAL_H 1
14
+
15
+ #if defined(__cplusplus)
16
+ extern "C" {
17
+ #if 0
18
+ } /* satisfy cc-mode */
19
+ #endif
20
+ #endif
21
+
22
+ struct rb_deprecated_classext_struct {
23
+ char conflict[sizeof(VALUE) * 3];
24
+ };
25
+
26
+ struct rb_classext_struct {
27
+ sa_table m_tbl;
28
+ sa_table iv_tbl;
29
+ sa_table const_tbl;
30
+ sa_table iv_index_tbl;
31
+ };
32
+
33
+ struct rb_class_cache_struct {
34
+ VALUE method_cache_version;
35
+ sa_table m_cache_tbl;
36
+ };
37
+
38
+ #undef RCLASS_SUPER
39
+ #define RCLASS_EXT(c) (RCLASS(c)->ptr)
40
+ #define RCLASS_SUPER(c) (RCLASS(c)->super)
41
+ #define RCLASS_IV_TBL(c) (&RCLASS_EXT(c)->iv_tbl)
42
+ #define RCLASS_CONST_TBL(c) (&RCLASS_EXT(c)->const_tbl)
43
+ #define RCLASS_M_TBL(c) (&RCLASS_EXT(c)->m_tbl)
44
+ #define RCLASS_IV_INDEX_TBL(c) (&RCLASS_EXT(c)->iv_index_tbl)
45
+
46
+ struct vtm; /* defined by timev.h */
47
+
48
+ /* array.c */
49
+ VALUE rb_ary_last(int, VALUE *, VALUE);
50
+
51
+ /* bignum.c */
52
+ VALUE rb_big_fdiv(VALUE x, VALUE y);
53
+ VALUE rb_big_uminus(VALUE x);
54
+
55
+ /* class.c */
56
+ VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj);
57
+ VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj);
58
+ VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj);
59
+ VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj);
60
+ int rb_obj_basic_to_s_p(VALUE);
61
+ void Init_class_hierarchy(void);
62
+
63
+ /* compile.c */
64
+ int rb_dvar_defined(ID);
65
+ int rb_local_defined(ID);
66
+ int rb_parse_in_eval(void);
67
+ int rb_parse_in_main(void);
68
+ VALUE rb_insns_name_array(void);
69
+
70
+ /* cont.c */
71
+ VALUE rb_obj_is_fiber(VALUE);
72
+ void rb_fiber_reset_root_local_storage(VALUE);
73
+
74
+ /* debug.c */
75
+ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
76
+
77
+ /* dmyext.c */
78
+ void Init_ext(void);
79
+
80
+ /* encoding.c */
81
+ ID rb_id_encoding(void);
82
+
83
+ /* encoding.c */
84
+ void rb_gc_mark_encodings(void);
85
+
86
+ /* error.c */
87
+ NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4));
88
+ VALUE rb_check_backtrace(VALUE);
89
+ NORETURN(void rb_async_bug_errno(const char *,int));
90
+
91
+ /* eval_error.c */
92
+ void ruby_error_print(void);
93
+ VALUE rb_get_backtrace(VALUE info);
94
+
95
+ /* eval_jump.c */
96
+ void rb_call_end_proc(VALUE data);
97
+
98
+ /* file.c */
99
+ VALUE rb_home_dir(const char *user, VALUE result);
100
+ VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
101
+ VALUE rb_file_expand_path_fast(VALUE, VALUE);
102
+ VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
103
+ VALUE rb_get_path_check_to_string(VALUE, int);
104
+ VALUE rb_get_path_check_convert(VALUE, VALUE, int);
105
+ void Init_File(void);
106
+
107
+ #ifdef _WIN32
108
+ /* file.c, win32/file.c */
109
+ void rb_w32_init_file(void);
110
+ #endif
111
+
112
+ /* gc.c */
113
+ void Init_heap(void);
114
+
115
+ /* inits.c */
116
+ void rb_call_inits(void);
117
+
118
+ /* io.c */
119
+ const char *ruby_get_inplace_mode(void);
120
+ void ruby_set_inplace_mode(const char *);
121
+ ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
122
+ void rb_stdio_set_default_encoding(void);
123
+
124
+ /* iseq.c */
125
+ VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);
126
+ VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase);
127
+
128
+ /* load.c */
129
+ VALUE rb_get_load_path(void);
130
+ VALUE rb_get_expanded_load_path(void);
131
+
132
+ /* math.c */
133
+ VALUE rb_math_atan2(VALUE, VALUE);
134
+ VALUE rb_math_cos(VALUE);
135
+ VALUE rb_math_cosh(VALUE);
136
+ VALUE rb_math_exp(VALUE);
137
+ VALUE rb_math_hypot(VALUE, VALUE);
138
+ VALUE rb_math_log(int argc, VALUE *argv);
139
+ VALUE rb_math_sin(VALUE);
140
+ VALUE rb_math_sinh(VALUE);
141
+ VALUE rb_math_sqrt(VALUE);
142
+
143
+ /* newline.c */
144
+ void Init_newline(void);
145
+
146
+ /* numeric.c */
147
+ int rb_num_to_uint(VALUE val, unsigned int *ret);
148
+ int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl);
149
+ double ruby_float_mod(double x, double y);
150
+
151
+ /* object.c */
152
+ VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
153
+
154
+ /* parse.y */
155
+ VALUE rb_parser_get_yydebug(VALUE);
156
+ VALUE rb_parser_set_yydebug(VALUE, VALUE);
157
+
158
+ /* proc.c */
159
+ VALUE rb_proc_location(VALUE self);
160
+
161
+ /* rational.c */
162
+ VALUE rb_lcm(VALUE x, VALUE y);
163
+ VALUE rb_rational_reciprocal(VALUE x);
164
+
165
+ /* re.c */
166
+ VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
167
+ VALUE rb_reg_check_preprocess(VALUE);
168
+
169
+ /* signal.c */
170
+ int rb_get_next_signal(void);
171
+
172
+ /* strftime.c */
173
+ size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, const struct vtm *vtm, struct timespec *ts, int gmt);
174
+
175
+ /* string.c */
176
+ int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
177
+
178
+ /* struct.c */
179
+ VALUE rb_struct_init_copy(VALUE copy, VALUE s);
180
+
181
+ /* time.c */
182
+ struct timeval rb_time_timeval(VALUE);
183
+
184
+ /* thread.c */
185
+ VALUE rb_obj_is_mutex(VALUE obj);
186
+ VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always);
187
+ void rb_thread_execute_interrupts(VALUE th);
188
+ void rb_clear_trace_func(void);
189
+ VALUE rb_thread_backtrace(VALUE thval);
190
+ VALUE rb_get_coverages(void);
191
+
192
+ /* thread_pthread.c, thread_win32.c */
193
+ void Init_native_thread(void);
194
+
195
+ /* vm.c */
196
+ VALUE rb_obj_is_thread(VALUE obj);
197
+ void rb_vm_mark(void *ptr);
198
+ void Init_BareVM(void);
199
+ VALUE rb_vm_top_self(void);
200
+ void rb_thread_recycle_stack_release(VALUE *);
201
+ void rb_vm_change_state(void);
202
+ void rb_vm_inc_const_missing_count(void);
203
+ void rb_thread_mark(void *th);
204
+ const void **rb_vm_get_insns_address_table(void);
205
+
206
+ /* vm_dump.c */
207
+ void rb_vm_bugreport(void);
208
+
209
+ /* vm_eval.c */
210
+ void Init_vm_eval(void);
211
+ VALUE rb_current_realfilepath(void);
212
+
213
+ /* vm_method.c */
214
+ void Init_eval_method(void);
215
+
216
+ /* miniprelude.c, prelude.c */
217
+ void Init_prelude(void);
218
+
219
+ #if defined __GNUC__ && __GNUC__ >= 4
220
+ #pragma GCC visibility push(default)
221
+ #endif
222
+ const char *rb_objspace_data_type_name(VALUE obj);
223
+
224
+ /* Temporary. This API will be removed (renamed). */
225
+ VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
226
+
227
+ /* experimental.
228
+ * These APIs can be changed on Ruby 1.9.4 or later.
229
+ * We will change these APIs (spac, name and so on) if there are something wrong.
230
+ * If you use these APIs, catch up future changes.
231
+ */
232
+ void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
233
+ VALUE rb_thread_call_without_gvl(
234
+ rb_blocking_function_t *func, void *data1,
235
+ rb_unblock_function_t *ubf, void *data2);
236
+
237
+ #if defined __GNUC__ && __GNUC__ >= 4
238
+ #pragma GCC visibility pop
239
+ #endif
240
+
241
+ #if defined(__cplusplus)
242
+ #if 0
243
+ { /* satisfy cc-mode */
244
+ #endif
245
+ } /* extern "C" { */
246
+ #endif
247
+
248
+ #endif /* RUBY_INTERNAL_H */