zscan 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90890a9e5126131f80b538ce9d3c19d140344405
4
- data.tar.gz: 3a90819be88c8699ee313d2ba36be1efd7ae9fa9
3
+ metadata.gz: 9b41042b9216e591e343f2f2161723a99a201089
4
+ data.tar.gz: 340660d1439a8ea4705897fc2fe78de8c8df63e4
5
5
  SHA512:
6
- metadata.gz: c020c65471f77226dcd0f50977b0a74dba28c8c56c78b3c3799839dd1314324eaff1e8f1e6e5db2c5a5dcd3c0455aabda81d603e33ce528f7505325a00db2f55
7
- data.tar.gz: de1d684b3a129ea2cc3fe435c7096e139b5b10c80c1f8b275e4cbbb760967a2897aad4e439da21bf8a67eb3b20370617d560b871f5d65d67ba39782b278e60a1
6
+ metadata.gz: 438a5ca786259ebb0eab1fde2e726a84fcd555d571736276c3a741aa6d9bff481374045945bb723171be4df605719c06ccc86e8f920cbd94ef214f3de7c43800
7
+ data.tar.gz: 1cc0264939f53c00333f4c18bd70667128ba4ac9e58c3a269c3c17a07ee8a6a446c3c346a33512f518ca62b9d29c998b0831116d584514c730a23c640b68c166
data/ext/extconf.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require "mkmf"
2
2
 
3
3
  if RbConfig::MAKEFILE_CONFIG['CC'] !~ /clang/
4
- $CFLAGS << ' -std=c99 -Wno-declaration-after-statement'
4
+ $CFLAGS << ' -std=c99 -Wno-declaration-after-statement -Wno-strict-aliasing'
5
5
  end
6
6
 
7
7
  create_makefile 'zscan'
data/ext/pack/internal.h CHANGED
@@ -1,419 +1,8 @@
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
1
+ #pragma once
2
+ // just a stub
21
3
 
22
4
  #define GCC_VERSION_SINCE(major, minor, patchlevel) \
23
5
  (defined(__GNUC__) && !defined(__INTEL_COMPILER) && \
24
6
  ((__GNUC__ > (major)) || \
25
7
  (__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \
26
8
  (__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))
27
-
28
- #if SIGNEDNESS_OF_TIME_T < 0 /* signed */
29
- # define TIMET_MAX (time_t)((~(unsigned_time_t)0) >> 1)
30
- # define TIMET_MIN (time_t)(((unsigned_time_t)1) << (sizeof(time_t) * CHAR_BIT - 1))
31
- #elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
32
- # define TIMET_MAX (time_t)(~(unsigned_time_t)0)
33
- # define TIMET_MIN (time_t)0
34
- #endif
35
- #define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
36
-
37
- #define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
38
- (a) == 0 ? 0 : \
39
- (a) == -1 ? (b) < -(max) : \
40
- (a) > 0 ? \
41
- ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
42
- ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
43
- #define MUL_OVERFLOW_FIXNUM_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
44
- #define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
45
- #define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
46
-
47
- struct rb_deprecated_classext_struct {
48
- char conflict[sizeof(VALUE) * 3];
49
- };
50
-
51
- struct rb_classext_struct {
52
- VALUE super;
53
- struct st_table *iv_tbl;
54
- struct st_table *const_tbl;
55
- VALUE origin;
56
- VALUE refined_class;
57
- rb_alloc_func_t allocator;
58
- };
59
-
60
- #undef RCLASS_SUPER
61
- #define RCLASS_EXT(c) (RCLASS(c)->ptr)
62
- #define RCLASS_SUPER(c) (RCLASS_EXT(c)->super)
63
- #define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
64
- #define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
65
- #define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
66
- #define RCLASS_IV_INDEX_TBL(c) (RCLASS(c)->iv_index_tbl)
67
- #define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin)
68
- #define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
69
-
70
- struct vtm; /* defined by timev.h */
71
-
72
- /* array.c */
73
- VALUE rb_ary_last(int, VALUE *, VALUE);
74
- void rb_ary_set_len(VALUE, long);
75
- VALUE rb_ary_cat(VALUE, const VALUE *, long);
76
- void rb_ary_delete_same(VALUE, VALUE);
77
-
78
- /* bignum.c */
79
- VALUE rb_big_fdiv(VALUE x, VALUE y);
80
- VALUE rb_big_uminus(VALUE x);
81
- VALUE rb_integer_float_cmp(VALUE x, VALUE y);
82
- VALUE rb_integer_float_eq(VALUE x, VALUE y);
83
-
84
- /* class.c */
85
- VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj);
86
- VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj);
87
- VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj);
88
- VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj);
89
- int rb_obj_basic_to_s_p(VALUE);
90
- VALUE rb_special_singleton_class(VALUE);
91
- VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
92
- void Init_class_hierarchy(void);
93
-
94
- /* compar.c */
95
- VALUE rb_invcmp(VALUE, VALUE);
96
-
97
- /* compile.c */
98
- int rb_dvar_defined(ID);
99
- int rb_local_defined(ID);
100
- int rb_parse_in_eval(void);
101
- int rb_parse_in_main(void);
102
- const char * rb_insns_name(int i);
103
- VALUE rb_insns_name_array(void);
104
-
105
- /* cont.c */
106
- VALUE rb_obj_is_fiber(VALUE);
107
- void rb_fiber_reset_root_local_storage(VALUE);
108
-
109
- /* debug.c */
110
- PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
111
-
112
- /* dmyext.c */
113
- void Init_ext(void);
114
-
115
- /* encoding.c */
116
- ID rb_id_encoding(void);
117
-
118
- /* encoding.c */
119
- void rb_gc_mark_encodings(void);
120
-
121
- /* error.c */
122
- NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4));
123
- VALUE rb_check_backtrace(VALUE);
124
- NORETURN(void rb_async_bug_errno(const char *,int));
125
- const char *rb_builtin_type_name(int t);
126
- const char *rb_builtin_class_name(VALUE x);
127
-
128
- /* eval.c */
129
- VALUE rb_refinement_module_get_refined_class(VALUE module);
130
-
131
- /* eval_error.c */
132
- void ruby_error_print(void);
133
- VALUE rb_get_backtrace(VALUE info);
134
-
135
- /* eval_jump.c */
136
- void rb_call_end_proc(VALUE data);
137
- void rb_mark_end_proc(void);
138
-
139
- /* file.c */
140
- VALUE rb_home_dir(const char *user, VALUE result);
141
- VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
142
- void rb_file_const(const char*, VALUE);
143
- int rb_file_load_ok(const char *);
144
- VALUE rb_file_expand_path_fast(VALUE, VALUE);
145
- VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
146
- VALUE rb_get_path_check_to_string(VALUE, int);
147
- VALUE rb_get_path_check_convert(VALUE, VALUE, int);
148
- void Init_File(void);
149
-
150
- #ifdef RUBY_FUNCTION_NAME_STRING
151
- # if defined __GNUC__ && __GNUC__ >= 4
152
- # pragma GCC visibility push(default)
153
- # endif
154
- NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path));
155
- # if defined __GNUC__ && __GNUC__ >= 4
156
- # pragma GCC visibility pop
157
- # endif
158
- # define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
159
- #else
160
- # define rb_sys_fail_path(path) rb_sys_fail_str(path)
161
- #endif
162
-
163
- #ifdef _WIN32
164
- /* file.c, win32/file.c */
165
- void rb_w32_init_file(void);
166
- #endif
167
-
168
- /* gc.c */
169
- void Init_heap(void);
170
- void *ruby_mimmalloc(size_t size);
171
-
172
- /* inits.c */
173
- void rb_call_inits(void);
174
-
175
- /* io.c */
176
- const char *ruby_get_inplace_mode(void);
177
- void ruby_set_inplace_mode(const char *);
178
- ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
179
- void rb_stdio_set_default_encoding(void);
180
- void rb_write_error_str(VALUE mesg);
181
-
182
- /* iseq.c */
183
- VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase);
184
-
185
- /* load.c */
186
- VALUE rb_get_load_path(void);
187
- VALUE rb_get_expanded_load_path(void);
188
- NORETURN(void rb_load_fail(VALUE, const char*));
189
-
190
- /* math.c */
191
- VALUE rb_math_atan2(VALUE, VALUE);
192
- VALUE rb_math_cos(VALUE);
193
- VALUE rb_math_cosh(VALUE);
194
- VALUE rb_math_exp(VALUE);
195
- VALUE rb_math_hypot(VALUE, VALUE);
196
- VALUE rb_math_log(int argc, VALUE *argv);
197
- VALUE rb_math_sin(VALUE);
198
- VALUE rb_math_sinh(VALUE);
199
- VALUE rb_math_sqrt(VALUE);
200
-
201
- /* newline.c */
202
- void Init_newline(void);
203
-
204
- /* numeric.c */
205
- int rb_num_to_uint(VALUE val, unsigned int *ret);
206
- VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
207
- int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl);
208
- double ruby_float_mod(double x, double y);
209
- int rb_num_negative_p(VALUE);
210
- VALUE rb_int_succ(VALUE num);
211
- VALUE rb_int_pred(VALUE num);
212
-
213
- /* object.c */
214
- VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
215
- VALUE rb_obj_hide(VALUE obj);
216
-
217
- /* parse.y */
218
- VALUE rb_parser_get_yydebug(VALUE);
219
- VALUE rb_parser_set_yydebug(VALUE, VALUE);
220
- int rb_is_const_name(VALUE name);
221
- int rb_is_class_name(VALUE name);
222
- int rb_is_global_name(VALUE name);
223
- int rb_is_instance_name(VALUE name);
224
- int rb_is_attrset_name(VALUE name);
225
- int rb_is_local_name(VALUE name);
226
- int rb_is_method_name(VALUE name);
227
- int rb_is_junk_name(VALUE name);
228
- void rb_gc_mark_parser(void);
229
- void rb_gc_mark_symbols(void);
230
-
231
- /* proc.c */
232
- VALUE rb_proc_location(VALUE self);
233
- st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
234
-
235
- /* process.c */
236
- #define RB_MAX_GROUPS (65536)
237
-
238
- struct rb_execarg {
239
- int use_shell;
240
- union {
241
- struct {
242
- VALUE shell_script;
243
- } sh;
244
- struct {
245
- VALUE command_name;
246
- VALUE command_abspath; /* full path string or nil */
247
- VALUE argv_str;
248
- VALUE argv_buf;
249
- } cmd;
250
- } invoke;
251
- VALUE redirect_fds;
252
- VALUE envp_str;
253
- VALUE envp_buf;
254
- VALUE dup2_tmpbuf;
255
- unsigned pgroup_given : 1;
256
- unsigned umask_given : 1;
257
- unsigned unsetenv_others_given : 1;
258
- unsigned unsetenv_others_do : 1;
259
- unsigned close_others_given : 1;
260
- unsigned close_others_do : 1;
261
- unsigned chdir_given : 1;
262
- unsigned new_pgroup_given : 1;
263
- unsigned new_pgroup_flag : 1;
264
- unsigned uid_given : 1;
265
- unsigned gid_given : 1;
266
- rb_pid_t pgroup_pgid; /* asis(-1), new pgroup(0), specified pgroup (0<V). */
267
- VALUE rlimit_limits; /* Qfalse or [[rtype, softlim, hardlim], ...] */
268
- mode_t umask_mask;
269
- rb_uid_t uid;
270
- rb_gid_t gid;
271
- VALUE fd_dup2;
272
- VALUE fd_close;
273
- VALUE fd_open;
274
- VALUE fd_dup2_child;
275
- int close_others_maxhint;
276
- VALUE env_modification; /* Qfalse or [[k1,v1], ...] */
277
- VALUE chdir_dir;
278
- };
279
-
280
- /* argv_str contains extra two elements.
281
- * The beginning one is for /bin/sh used by exec_with_sh.
282
- * The last one for terminating NULL used by execve.
283
- * See rb_exec_fillarg() in process.c. */
284
- #define ARGVSTR2ARGC(argv_str) (RSTRING_LEN(argv_str) / sizeof(char *) - 2)
285
- #define ARGVSTR2ARGV(argv_str) ((char **)RSTRING_PTR(argv_str) + 1)
286
-
287
- rb_pid_t rb_fork_ruby(int *status);
288
- void rb_last_status_clear(void);
289
-
290
- /* rational.c */
291
- VALUE rb_lcm(VALUE x, VALUE y);
292
- VALUE rb_rational_reciprocal(VALUE x);
293
-
294
- /* re.c */
295
- VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
296
- VALUE rb_reg_check_preprocess(VALUE);
297
-
298
- /* signal.c */
299
- int rb_get_next_signal(void);
300
- int rb_sigaltstack_size(void);
301
-
302
- /* strftime.c */
303
- #ifdef RUBY_ENCODING_H
304
- size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc,
305
- const struct vtm *vtm, struct timespec *ts, int gmt);
306
- size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc,
307
- const struct vtm *vtm, VALUE timev, int gmt);
308
- #endif
309
-
310
- /* string.c */
311
- int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
312
- int rb_str_symname_p(VALUE);
313
- VALUE rb_str_quote_unprintable(VALUE);
314
- VALUE rb_id_quote_unprintable(ID);
315
- #define QUOTE(str) rb_str_quote_unprintable(str)
316
- #define QUOTE_ID(id) rb_id_quote_unprintable(id)
317
-
318
- /* struct.c */
319
- VALUE rb_struct_init_copy(VALUE copy, VALUE s);
320
-
321
- /* time.c */
322
- struct timeval rb_time_timeval(VALUE);
323
-
324
- /* thread.c */
325
- VALUE rb_obj_is_mutex(VALUE obj);
326
- VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
327
- void rb_thread_execute_interrupts(VALUE th);
328
- void rb_clear_trace_func(void);
329
- VALUE rb_get_coverages(void);
330
- VALUE rb_thread_shield_new(void);
331
- VALUE rb_thread_shield_wait(VALUE self);
332
- VALUE rb_thread_shield_release(VALUE self);
333
- VALUE rb_thread_shield_destroy(VALUE self);
334
- void rb_mutex_allow_trap(VALUE self, int val);
335
- VALUE rb_uninterruptible(VALUE (*b_proc)(ANYARGS), VALUE data);
336
- VALUE rb_mutex_owned_p(VALUE self);
337
- void ruby_kill(rb_pid_t pid, int sig);
338
-
339
- /* thread_pthread.c, thread_win32.c */
340
- void Init_native_thread(void);
341
-
342
- /* vm.c */
343
- VALUE rb_obj_is_thread(VALUE obj);
344
- void rb_vm_mark(void *ptr);
345
- void Init_BareVM(void);
346
- VALUE rb_vm_top_self(void);
347
- void rb_thread_recycle_stack_release(VALUE *);
348
- void rb_vm_change_state(void);
349
- void rb_vm_inc_const_missing_count(void);
350
- void rb_thread_mark(void *th);
351
- const void **rb_vm_get_insns_address_table(void);
352
- VALUE rb_sourcefilename(void);
353
-
354
- /* vm_dump.c */
355
- void rb_vm_bugreport(void);
356
- void rb_print_backtrace(void);
357
-
358
- /* vm_eval.c */
359
- void Init_vm_eval(void);
360
- VALUE rb_current_realfilepath(void);
361
- VALUE rb_check_block_call(VALUE, ID, int, VALUE *, VALUE (*)(ANYARGS), VALUE);
362
- typedef void rb_check_funcall_hook(int, VALUE, ID, int, VALUE *, VALUE);
363
- VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, VALUE *argv,
364
- rb_check_funcall_hook *hook, VALUE arg);
365
-
366
- /* vm_method.c */
367
- void Init_eval_method(void);
368
- int rb_method_defined_by(VALUE obj, ID mid, VALUE (*cfunc)(ANYARGS));
369
-
370
- /* miniprelude.c, prelude.c */
371
- void Init_prelude(void);
372
-
373
- /* vm_backtrace.c */
374
- void Init_vm_backtrace(void);
375
- VALUE rb_vm_thread_backtrace(int argc, VALUE *argv, VALUE thval);
376
- VALUE rb_vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval);
377
-
378
- VALUE rb_make_backtrace(void);
379
- void rb_backtrace_print_as_bugreport(void);
380
- int rb_backtrace_p(VALUE obj);
381
- VALUE rb_backtrace_to_str_ary(VALUE obj);
382
- VALUE rb_vm_backtrace_object();
383
-
384
- RUBY_SYMBOL_EXPORT_BEGIN
385
- const char *rb_objspace_data_type_name(VALUE obj);
386
-
387
- /* Temporary. This API will be removed (renamed). */
388
- VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
389
-
390
- /* io.c */
391
- void rb_maygvl_fd_fix_cloexec(int fd);
392
-
393
- /* process.c */
394
- int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
395
- rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
396
- VALUE rb_execarg_new(int argc, VALUE *argv, int accept_shell);
397
- struct rb_execarg *rb_execarg_get(VALUE execarg_obj); /* dangerous. needs GC guard. */
398
- VALUE rb_execarg_init(int argc, VALUE *argv, int accept_shell, VALUE execarg_obj);
399
- int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
400
- void rb_execarg_fixup(VALUE execarg_obj);
401
- int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
402
- VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
403
- void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
404
-
405
- /* variable.c */
406
- void rb_gc_mark_global_tbl(void);
407
- void rb_mark_generic_ivar(VALUE);
408
- void rb_mark_generic_ivar_tbl(void);
409
-
410
- RUBY_SYMBOL_EXPORT_END
411
-
412
- #if defined(__cplusplus)
413
- #if 0
414
- { /* satisfy cc-mode */
415
- #endif
416
- } /* extern "C" { */
417
- #endif
418
-
419
- #endif /* RUBY_INTERNAL_H */
data/lib/zscan.rb CHANGED
@@ -3,7 +3,7 @@ require_relative "zscan/bspec"
3
3
  require "date"
4
4
 
5
5
  class ZScan
6
- VERSION = '2.0.1'
6
+ VERSION = '2.0.2'
7
7
 
8
8
  def initialize s, dup=false
9
9
  if s.encoding.ascii_compatible?
data/rakefile CHANGED
@@ -23,7 +23,7 @@ end
23
23
 
24
24
  desc "pack gem"
25
25
  file gem_package => gem_files + Generate.files do
26
- sh "rm zscan-*.gem"
26
+ sh "rm -f zscan-*.gem"
27
27
 
28
28
  new_version = false
29
29
  lines = File.readlines('zscan.gemspec')
data/readme.md CHANGED
@@ -202,6 +202,14 @@ Use pos management methods.
202
202
 
203
203
  Thought of that but the API can be quirky... It's way beyond a string scanner.
204
204
 
205
+ ## Build
206
+
207
+ ```bash
208
+ gem ins rspec
209
+ rake gen
210
+ rake
211
+ ```
212
+
205
213
  ## License
206
214
 
207
215
  ```
data/zscan.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "zscan"
3
- s.version = "2.0.1" # version mapped from zscan.rb, don't change here
3
+ s.version = "2.0.2" # version mapped from zscan.rb, don't change here
4
4
  s.author = "Zete Lui"
5
5
  s.homepage = "https://github.com/luikore/zscan"
6
6
  s.platform = Gem::Platform::RUBY
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zscan
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zete Lui