ruhl 0.25.0 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/ruhl/engine.rb +7 -7
  3. data/ruhl.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.25.0
1
+ 0.26.0
data/lib/ruhl/engine.rb CHANGED
@@ -217,13 +217,13 @@ module Ruhl
217
217
  _render_
218
218
  else
219
219
  args = code.strip.split('|').collect{|p| p.strip}
220
- objects = [block_object,local_object,scope]
221
- index = -1
222
- begin
223
- index = index + 1
224
- objects[index].send(*args)
225
- rescue NoMethodError => e
226
- index < 2 ? retry : raise(e)
220
+
221
+ if block_object.respond_to?(args.first)
222
+ block_object.send(*args)
223
+ elsif local_object.respond_to?(args.first)
224
+ local_object.send(*args)
225
+ else
226
+ scope.send(*args)
227
227
  end
228
228
  end
229
229
  rescue NoMethodError => nme
data/ruhl.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruhl}
8
- s.version = "0.25.0"
8
+ s.version = "0.26.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Stone"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruhl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone