public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Use trenary operator here.

Don't pay *too* much attention to this change.
Thu Sep 25 00:46:17 -0700 2008
commit  0f4957f2e03ba79eb914563507b0582738fb5d37
tree    b996291521cd349603512f692b9c3d8e1b4e1442
parent  03ff7c4957115750d6802b9dee969be14a4b3057
...
488
489
490
491
492
493
494
495
 
 
496
497
498
...
488
489
490
 
 
 
 
 
491
492
493
494
495
0
@@ -488,11 +488,8 @@ class Merb::AbstractController
0
       ret = yield *args
0
     end
0
 
0
-    if captured.empty?
0
-      ret.to_s
0
-    else
0
-      captured
0
-    end
0
+    # return captured value only if it is not empty
0
+    captured.empty? ? ret.to_s : captured
0
   end
0
 
0
   # Calls the concatenate method for the selected template engine.

Comments