zrb 1.1.0 → 1.1.1

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: ca74f2e1175ee6aea15e0f2eab11178c0b510a6d
4
- data.tar.gz: d894764442ddb832d1a8f078a3ee67dd7557085d
3
+ metadata.gz: b133af75330b0d640a7e49c8e178c49ddffa73c4
4
+ data.tar.gz: c0bbf52ba08cedab9e6d977c919770dcb6211ec4
5
5
  SHA512:
6
- metadata.gz: f888660ba7a9d00df41066a320931d8eda2aa8008a633742e4ae069dc721d0de38eea3c64e89809120835fb084b4f27e0bf22edd4417bfc0ffea2ad08130b334
7
- data.tar.gz: 9b1ccca72be9290cd7d5f5b9f79446ce46462a7faf4d7e787272360bc73c6d89b23c2c8574587a1b5a4425f32bf43f0c98ff3246f902c1a2bef0b9262bed202a
6
+ metadata.gz: '080d8f33a816df69152715243a437f073d3e4bc5943b8e45b6096936a52f6bea69559018b32a0dc39db3ce4eee45065b0661f5697793e682e06fca4e4a50f820'
7
+ data.tar.gz: 4f89b829e297626bae289890f79ea312e33e827bcfaa28d880a9feb864de01057392f29a504854f8a3fbd51663bc462549dbc43e6dbb48551f9c717e04646b4f
data/lib/zrb.rb CHANGED
@@ -170,9 +170,12 @@ module ZRB
170
170
 
171
171
  def capture(blk, *args)
172
172
  start = self.size
173
- blk.call(*args)
174
- ensure
175
- return self.slice!(start..-1)
173
+ begin
174
+ blk.call(*args)
175
+ ensure
176
+ result = self.slice!(start..-1)
177
+ end
178
+ result
176
179
  end
177
180
  end
178
181
 
@@ -1,4 +1,4 @@
1
1
  module ZRB
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
4
4
 
@@ -115,6 +115,20 @@ world
115
115
  assert_equal "<form>Hello /awesome!</form>", t.render(self).strip
116
116
  end
117
117
 
118
+ def test_block_expr_error
119
+ @form_buffer = @buffer = Buffer.new
120
+ t = Template.new { <<-'EOF' }
121
+ <?= form_for do |path| ?>
122
+ Hello #{path}!
123
+ <? raise ?>
124
+ <? end ?>
125
+ EOF
126
+
127
+ assert_raises do
128
+ t.render(self)
129
+ end
130
+ end
131
+
118
132
  def test_html
119
133
  @buffer = HTMLBuffer.new
120
134
  t = Template.new { 'Hello #{"&"}' }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Holm