Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Eliminate @restrictions not initialized warning [#28 state:resolved]
  • Loading branch information
jgarber committed Aug 5, 2008
1 parent 2534ee2 commit f8602c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/redcloth_scan/redcloth.h
Expand Up @@ -24,7 +24,7 @@ VALUE red_pass(VALUE, VALUE, VALUE, ID, VALUE);
VALUE red_pass_code(VALUE, VALUE, VALUE, ID);

/* parser macros */
#define CLEAR_REGS() regs = rb_hash_new(); rb_hash_aset(regs, ID2SYM(rb_intern("restrictions")), rb_iv_get(self, "@restrictions"));
#define CLEAR_REGS() regs = rb_hash_new();
#define CAT(H) rb_str_cat(H, ts, te-ts)
#define CLEAR(H) H = rb_str_new2("")
#define INLINE(H, T) rb_str_append(H, rb_funcall(self, rb_intern(#T), 1, regs))
Expand Down
6 changes: 3 additions & 3 deletions test/test_parser.rb
Expand Up @@ -21,15 +21,15 @@ def test_redcloth_version_to_s
end

def test_badly_formatted_table_does_not_segfault
assert_match /td/, RedCloth.new(%Q{| one | two |\nthree | four |}).to_html
assert_match(/td/, RedCloth.new(%Q{| one | two |\nthree | four |}).to_html)
end

def test_table_without_block_end_does_not_segfault
assert_match /h3/, RedCloth.new("| a | b |\n| c | d |\nh3. foo").to_html
assert_match(/h3/, RedCloth.new("| a | b |\n| c | d |\nh3. foo").to_html)
end

def test_table_with_empty_cells_does_not_segfault
assert_match /td/, RedCloth.new(%Q{|one || |\nthree | four |}).to_html
assert_match(/td/, RedCloth.new(%Q{|one || |\nthree | four |}).to_html)
end

def test_unfinished_html_block_does_not_segfault_with_filter_html
Expand Down

0 comments on commit f8602c6

Please sign in to comment.