Skip to content

Commit

Permalink
fix xml.instruct bug when arguments are used
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhq committed Jul 26, 2009
1 parent b7a0372 commit 89b36e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/asbestos.rb
Expand Up @@ -46,7 +46,7 @@ def target!
@target
end

def instruct!
def instruct!(*args)
end

def tag!(sym, *args, &block)
Expand Down
5 changes: 5 additions & 0 deletions spec/asbestos_spec.rb
Expand Up @@ -54,6 +54,11 @@ def to_json
to_json.should == '{}'
end

it "should ignore instruct when used with attributes" do
@json.instruct! :xml, :version => "1.0"
to_json.should == '{}'
end

it "should support ignores" do
@json = described_class.new(:ignore => ['foo'])
@json.foo do
Expand Down

0 comments on commit 89b36e5

Please sign in to comment.