# Case e ERb

**URL:** <https://www.ruby-forum.com/t/case-e-erb/74029>\
**Category:** IT\
**Created:** [October 29, 2006, 8:15am UTC](https://www.ruby-forum.com/t/case-e-erb/74029 "2006-10-29T08:15:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BSMaffettone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e68b1a/32.png) [@BSMaffettone](https://www.ruby-forum.com/u/BSMaffettone)\
**Post date:** [October 29, 2006, 8:15am UTC](https://www.ruby-forum.com/t/case-e-erb/74029/1 "2006-10-29T08:15:46Z")

</div>

Scritto cosÃ¬ funziona

\<% case test  
when ‘a’ %\>  
\<% puts ‘a’ %\>  
\<% when ‘b’ %\>  
\<% puts ‘b’ %\>  
\<% else %\>  
\<% puts ‘c’ %\>  
\<% end %\>

Mi aspettavo che funzionasse anche cosÃ¬  
\<% case test %\>  
\<% when ‘a’ %\>  
\<% puts ‘a’ %\>  
\<% when ‘b’ %\>  
\<% puts ‘b’ %\>  
\<% else %\>  
\<% puts ‘c’ %\>  
\<% end %\>

ma si ha errore di sintassi in  
\<% case test %\>

Vi Ã¨ un motivo ?  
Ciao a tutti
