utilrb 2.0.0 → 2.0.1

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.
data/test/test_object.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'test/test_config'
1
+ require './test/test_config'
2
2
 
3
3
  require 'utilrb/object'
4
4
  require 'utilrb/module/attr_predicate'
@@ -1,4 +1,4 @@
1
- require 'test/test_config'
1
+ require './test/test_config'
2
2
 
3
3
  require 'utilrb/objectstats'
4
4
  require 'utilrb/hash/to_s'
data/test/test_proc.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'test/test_config'
1
+ require './test/test_config'
2
2
 
3
3
  require 'utilrb'
4
4
 
data/test/test_set.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'test/test_config'
1
+ require './test/test_config'
2
2
  require 'utilrb/set'
3
3
 
4
4
  class TC_Set < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require 'test/test_config'
1
+ require './test/test_config'
2
2
  require 'utilrb/thread_pool'
3
3
  require 'minitest/spec'
4
4
 
data/test/test_time.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'test/test_config'
1
+ require './test/test_config'
2
2
  require 'utilrb/time'
3
3
 
4
4
  class TC_Time < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require 'test/test_config'
1
+ require './test/test_config'
2
2
  require 'utilrb/unbound_method'
3
3
  require 'flexmock'
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utilrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-19 00:00:00.000000000 Z
12
+ date: 2013-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: facets
@@ -147,10 +147,7 @@ files:
147
147
  - bm/speed.rb
148
148
  - ext/utilrb/extconf.rb
149
149
  - ext/utilrb/proc.c
150
- - ext/utilrb/ruby_internals-1.8.h
151
- - ext/utilrb/ruby_internals-1.9.h
152
150
  - ext/utilrb/ruby_allocator.hh
153
- - ext/utilrb/swap.cc
154
151
  - ext/utilrb/utilrb.cc
155
152
  - ext/utilrb/value_set.cc
156
153
  - ext/utilrb/weakref.cc
@@ -170,6 +167,7 @@ files:
170
167
  - lib/utilrb/enumerable/sequence.rb
171
168
  - lib/utilrb/enumerable/to_s_helper.rb
172
169
  - lib/utilrb/enumerable/uniq.rb
170
+ - lib/utilrb/event_loop.rb
173
171
  - lib/utilrb/exception.rb
174
172
  - lib/utilrb/exception/full_message.rb
175
173
  - lib/utilrb/gc.rb
@@ -187,7 +185,6 @@ files:
187
185
  - lib/utilrb/kernel/options.rb
188
186
  - lib/utilrb/kernel/poll.rb
189
187
  - lib/utilrb/kernel/require.rb
190
- - lib/utilrb/kernel/swap.rb
191
188
  - lib/utilrb/kernel/with_module.rb
192
189
  - lib/utilrb/logger.rb
193
190
  - lib/utilrb/logger/forward.rb
@@ -196,7 +193,10 @@ files:
196
193
  - lib/utilrb/logger/io.rb
197
194
  - lib/utilrb/logger/log_pp.rb
198
195
  - lib/utilrb/logger/root.rb
196
+ - lib/utilrb/logger/silent.rb
199
197
  - lib/utilrb/marshal/load_with_missing_constants.rb
198
+ - lib/utilrb/models/inherited_enumerable.rb
199
+ - lib/utilrb/models/registration.rb
200
200
  - lib/utilrb/module.rb
201
201
  - lib/utilrb/module/ancestor_p.rb
202
202
  - lib/utilrb/module/attr_enumerable.rb
@@ -214,7 +214,11 @@ files:
214
214
  - lib/utilrb/object/scoped_eval.rb
215
215
  - lib/utilrb/object/singleton_class.rb
216
216
  - lib/utilrb/objectstats.rb
217
+ - lib/utilrb/pathname.rb
218
+ - lib/utilrb/pathname/find_matching_parent.rb
217
219
  - lib/utilrb/pkgconfig.rb
220
+ - lib/utilrb/qt/mime_data/mime_data.rb
221
+ - lib/utilrb/qt/variant/from_ruby.rb
218
222
  - lib/utilrb/rake_common.rb
219
223
  - lib/utilrb/ruby_object_graph.rb
220
224
  - lib/utilrb/set.rb
@@ -223,6 +227,7 @@ files:
223
227
  - lib/utilrb/socket/tcp_socket.rb
224
228
  - lib/utilrb/spawn.rb
225
229
  - lib/utilrb/symbol/to_str.rb
230
+ - lib/utilrb/thread_pool.rb
226
231
  - lib/utilrb/time.rb
227
232
  - lib/utilrb/time/to_hms.rb
228
233
  - lib/utilrb/timepoints.rb
@@ -238,24 +243,24 @@ files:
238
243
  - test/test_config.rb
239
244
  - test/test_dir.rb
240
245
  - test/test_enumerable.rb
246
+ - test/test_event_loop.rb
241
247
  - test/test_exception.rb
242
248
  - test/test_gc.rb
243
249
  - test/test_hash.rb
244
250
  - test/test_kernel.rb
245
251
  - test/test_logger.rb
246
252
  - test/test_misc.rb
253
+ - test/test_models.rb
247
254
  - test/test_module.rb
248
255
  - test/test_object.rb
249
256
  - test/test_objectstats.rb
250
257
  - test/test_pkgconfig.rb
251
258
  - test/test_proc.rb
252
259
  - test/test_set.rb
260
+ - test/test_thread_pool.rb
253
261
  - test/test_time.rb
254
262
  - test/test_unbound_method.rb
255
263
  - test/test_weakref.rb
256
- - test/test_models.rb
257
- - test/test_thread_pool.rb
258
- - test/test_event_loop.rb
259
264
  homepage: http://rock-robotics.org
260
265
  licenses:
261
266
  - BSD
@@ -285,25 +290,25 @@ signing_key:
285
290
  specification_version: 3
286
291
  summary: Utilrb is yet another Ruby toolkit, in the spirit of facets
287
292
  test_files:
288
- - test/test_models.rb
289
- - test/test_kernel.rb
293
+ - test/test_weakref.rb
290
294
  - test/test_unbound_method.rb
291
- - test/test_hash.rb
295
+ - test/test_enumerable.rb
292
296
  - test/test_exception.rb
293
- - test/test_thread_pool.rb
294
- - test/test_config.rb
295
- - test/test_time.rb
296
- - test/test_event_loop.rb
297
- - test/test_logger.rb
298
- - test/test_module.rb
299
297
  - test/test_objectstats.rb
300
- - test/test_enumerable.rb
301
- - test/test_gc.rb
302
- - test/test_misc.rb
303
- - test/test_object.rb
304
- - test/test_array.rb
298
+ - test/test_models.rb
305
299
  - test/test_dir.rb
306
- - test/test_weakref.rb
307
- - test/test_proc.rb
300
+ - test/test_time.rb
301
+ - test/test_misc.rb
308
302
  - test/test_set.rb
303
+ - test/test_config.rb
304
+ - test/test_logger.rb
305
+ - test/test_proc.rb
306
+ - test/test_hash.rb
307
+ - test/test_array.rb
308
+ - test/test_object.rb
309
+ - test/test_thread_pool.rb
310
+ - test/test_module.rb
311
+ - test/test_event_loop.rb
312
+ - test/test_kernel.rb
309
313
  - test/test_pkgconfig.rb
314
+ - test/test_gc.rb
@@ -1,72 +0,0 @@
1
- #ifndef __RUBY_INTERNALS_HH__
2
- #define __RUBY_INTERNALS_HH__
3
-
4
- /* WARNING: this file contains copies of internal Ruby structures. They are not supposed to be copied (I think ;-)), but I had to nonetheless.
5
- * The following methods depend on these:
6
- *
7
- * Kernel.swap!
8
- * Proc#same_body?
9
- * Proc#file
10
- * Proc#line
11
- */
12
-
13
- #include <ruby.h>
14
- #include <intern.h>
15
- #include <node.h>
16
- #include <re.h>
17
- #include <env.h>
18
-
19
- typedef struct RVALUE {
20
- union {
21
- struct {
22
- unsigned long flags; /* always 0 for freed obj */
23
- struct RVALUE *next;
24
- } free;
25
- struct RBasic basic;
26
- struct RObject object;
27
- struct RClass klass;
28
- struct RFloat flonum;
29
- struct RString string;
30
- struct RArray array;
31
- struct RRegexp regexp;
32
- struct RHash hash;
33
- struct RData data;
34
- struct RStruct rstruct;
35
- struct RBignum bignum;
36
- struct RFile file;
37
- struct RNode node;
38
- struct RMatch match;
39
- struct RVarmap varmap;
40
- struct SCOPE scope;
41
- } as;
42
- #ifdef GC_DEBUG
43
- char *file;
44
- int line;
45
- #endif
46
- } RVALUE;
47
- static const size_t SLOT_SIZE = sizeof(RVALUE);
48
-
49
- /* This is a copy of Ruby 1.8.5 BLOCK structure. It sucks to copy it here,
50
- * but it is not public in Ruby and it is needed to define same_body? */
51
- struct BLOCK {
52
- NODE *var;
53
- NODE *body;
54
- VALUE self;
55
- struct FRAME frame;
56
- struct SCOPE *scope;
57
- VALUE klass;
58
- NODE *cref;
59
- int iter;
60
- int vmode;
61
- int flags;
62
- int uniq;
63
- struct RVarmap *dyna_vars;
64
- VALUE orig_thread;
65
- VALUE wrapper;
66
- VALUE block_obj;
67
- struct BLOCK *outer;
68
- struct BLOCK *prev;
69
- };
70
-
71
- #endif
72
-
@@ -1,71 +0,0 @@
1
- #ifndef __RUBY_INTERNALS_HH__
2
- #define __RUBY_INTERNALS_HH__
3
-
4
- /* WARNING: this file contains copies of internal Ruby structures. They are not supposed to be copied (I think ;-)), but I had to nonetheless.
5
- * The following methods depend on these:
6
- *
7
- * Kernel.swap!
8
- * Proc#same_body?
9
- * Proc#file
10
- * Proc#line
11
- */
12
-
13
- #include <ruby.h>
14
- #include <ruby/intern.h>
15
- #include <ruby/re.h>
16
-
17
- typedef struct RNode {
18
- unsigned long flags;
19
- char *nd_file;
20
- union {
21
- struct RNode *node;
22
- ID id;
23
- VALUE value;
24
- VALUE (*cfunc)(ANYARGS);
25
- ID *tbl;
26
- } u1;
27
- union {
28
- struct RNode *node;
29
- ID id;
30
- long argc;
31
- VALUE value;
32
- } u2;
33
- union {
34
- struct RNode *node;
35
- ID id;
36
- long state;
37
- struct global_entry *entry;
38
- long cnt;
39
- VALUE value;
40
- } u3;
41
- } NODE;
42
-
43
- typedef struct RVALUE {
44
- union {
45
- struct {
46
- VALUE flags; /* always 0 for freed obj */
47
- struct RVALUE *next;
48
- } free;
49
- struct RBasic basic;
50
- struct RObject object;
51
- struct RClass klass;
52
- struct RFloat flonum;
53
- struct RString string;
54
- struct RArray array;
55
- struct RRegexp regexp;
56
- struct RHash hash;
57
- struct RData data;
58
- struct RStruct rstruct;
59
- struct RBignum bignum;
60
- struct RFile file;
61
- struct RNode node;
62
- struct RMatch match;
63
- struct RRational rational;
64
- struct RComplex complex;
65
- } as;
66
- } RVALUE;
67
-
68
- static const size_t SLOT_SIZE = sizeof(RVALUE);
69
-
70
- #endif
71
-
data/ext/utilrb/swap.cc DELETED
@@ -1,31 +0,0 @@
1
- #ifdef RUBY_IS_19
2
- #include "ruby_internals-1.9.h"
3
- #else
4
- #include "ruby_internals-1.8.h"
5
- #endif
6
-
7
- /*
8
- * Kernel.swap!(obj1, obj2, *args)
9
- *
10
- * Swaps the object which are being hold by obj1 and obj2.
11
- *
12
- * WARNING: I don't know if this can be called in a method of +obj1+ or +obj2+
13
- */
14
- static VALUE kernel_swap_bang(VALUE self, VALUE obj1, VALUE obj2)
15
- {
16
- // Save the definition of the old object
17
- RVALUE old_obj;
18
- memcpy(&old_obj, reinterpret_cast<void*>(obj1), SLOT_SIZE);
19
- // Place the definition of the new object in the slot of the old one
20
- memcpy(reinterpret_cast<void*>(obj1), reinterpret_cast<void*>(obj2), SLOT_SIZE);
21
- // Place the definition of the old object in the slot of the new one
22
- memcpy(reinterpret_cast<void*>(obj2), &old_obj, SLOT_SIZE);
23
-
24
- return Qnil;
25
- }
26
-
27
- extern "C" void Init_swap()
28
- {
29
- rb_define_singleton_method(rb_mKernel, "swap!", RUBY_METHOD_FUNC(kernel_swap_bang), 2);
30
- }
31
-
@@ -1,2 +0,0 @@
1
- require 'utilrb/common'
2
- Utilrb.require_ext('Kernel#swap!')