ParseTree 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/History.txt +7 -1
  2. data/Rakefile +1 -1
  3. data/lib/parse_tree.rb +4 -8
  4. metadata +1 -1
@@ -1,4 +1,10 @@
1
- === 2.1.0 / 2007-10-30
1
+ === 2.1.1 / 2007-12-22
2
+
3
+ * 1 bug fix:
4
+
5
+ * _sigh_ apparently I've been running w/o all my anal compiler flags on.
6
+
7
+ === 2.1.0 / 2007-12-21
2
8
 
3
9
  * 13 minor enhancements:
4
10
 
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Hoe.new("ParseTree", ParseTree::VERSION) do |p|
11
11
  p.summary = "Extract and enumerate ruby parse trees."
12
12
  p.summary = p.paragraphs_of("README.txt", 2).join("\n\n")
13
13
  p.description = p.paragraphs_of("README.txt", 2..6, 8).join("\n\n")
14
- p.changes = p.paragraphs_of("History.txt", 1..6).join("\n\n").gsub(/\s*===.*\Z/ms, '')
14
+ p.changes = p.paragraphs_of("History.txt", 0..2).join("\n\n")
15
15
  p.clean_globs << File.expand_path("~/.ruby_inline")
16
16
  p.extra_deps << ['RubyInline', '>= 3.6.0']
17
17
  p.spec_extras[:require_paths] = proc { |paths| paths << 'test' }
@@ -41,7 +41,7 @@ end
41
41
 
42
42
  class ParseTree
43
43
 
44
- VERSION = '2.1.0'
44
+ VERSION = '2.1.1'
45
45
 
46
46
  ##
47
47
  # Front end translation method.
@@ -334,7 +334,6 @@ class ParseTree
334
334
  builder.prefix %Q@
335
335
  void add_to_parse_tree(VALUE self, VALUE ary, NODE * n, ID * locals) {
336
336
  NODE * volatile node = n;
337
- VALUE old_ary = Qnil;
338
337
  VALUE current;
339
338
  VALUE node_name;
340
339
  static VALUE node_names = Qnil;
@@ -364,9 +363,7 @@ again:
364
363
  rb_ary_push(ary, current);
365
364
  rb_ary_push(current, node_name);
366
365
 
367
- again_no_block:
368
-
369
- switch (nd_type(node)) {
366
+ switch (nd_type(node)) {
370
367
 
371
368
  case NODE_BLOCK:
372
369
  {
@@ -438,7 +435,7 @@ again_no_block:
438
435
  case NODE_WHEN:
439
436
  when_level++;
440
437
  if (!inside_case_args && case_level < when_level) { /* when without case, ie, no expr in case */
441
- when_level--; if (when_level < 0) when_level = 0;
438
+ if (when_level > 0) when_level--;
442
439
  rb_ary_pop(ary); /* reset what current is pointing at */
443
440
  node = NEW_CASE(0, node);
444
441
  goto again;
@@ -453,7 +450,7 @@ again_no_block:
453
450
  rb_ary_push(current, Qnil);
454
451
  }
455
452
 
456
- when_level--; if (when_level < 0) when_level = 0;
453
+ if (when_level > 0) when_level--;
457
454
  break;
458
455
 
459
456
  case NODE_WHILE:
@@ -1011,7 +1008,6 @@ static VALUE parse_tree_for_str(VALUE source, VALUE filename, VALUE line) {
1011
1008
  VALUE result = rb_ary_new();
1012
1009
  NODE *node = NULL;
1013
1010
  int critical;
1014
- int newlines = RTEST(rb_iv_get(self, "@include_newlines"));
1015
1011
 
1016
1012
  tmp = rb_check_string_type(filename);
1017
1013
  if (NIL_P(tmp)) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ParseTree
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis