# Variables with a name ending in question mark

**URL:** <https://www.ruby-forum.com/t/variables-with-a-name-ending-in-question-mark/116027>\
**Category:** Ruby\
**Created:** [October 1, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/variables-with-a-name-ending-in-question-mark/116027 "2007-10-01T18:49:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [October 1, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/variables-with-a-name-ending-in-question-mark/116027/1 "2007-10-01T18:49:35Z")

</div>

question?  
is that a valid ruby variable name?  
if not: would that be a useful feature for ruby to introduce?  
if so: should I RCR it?

Thanks!  
-Roger

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [October 1, 2007, 7:06pm UTC](https://www.ruby-forum.com/t/variables-with-a-name-ending-in-question-mark/116027/2 "2007-10-01T19:06:37Z")

</div>

On 10/1/07, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> question?  
> is that a valid ruby variable name?

nope.

> if not: would that be a useful feature for ruby to introduce?

perhaps, but I think it would be hard (impossible?) to do without  
breaking this critical functionality:  
[http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotallyValid.html](http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotallyValid.html)

o.0,  
-Harold

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [October 1, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/variables-with-a-name-ending-in-question-mark/116027/3 "2007-10-01T19:43:01Z")

</div>

variables ending with ? are not valid in Ruby.  
They would not be useful.  
Methods ending in ? normally return true or false.

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [October 2, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/variables-with-a-name-ending-in-question-mark/116027/4 "2007-10-02T20:47:56Z")

</div>

On 10/1/07, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > breaking this critical functionality:  
> > [http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotallyValid.html](http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotallyValid.html)

> Question: are these YelpsAndSqueals used much?

As José Jiménez  
[José Jiménez (character) - Wikipedia](http://en.wikipedia.org/wiki/Jos%C3%A9_Jim%C3%A9nez_%28character%29) in  
his “Reluctant Astronaut” role was wont to say in response to the  
question, “What’s that your’e holding? Is that your crash helmet?”

"Oooo, I hope not1’

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [October 1, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/variables-with-a-name-ending-in-question-mark/116027/5 "2007-10-01T19:56:11Z")

</div>

Harold H. wrote:

> On 10/1/07, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > question?  
> > is that a valid ruby variable name?
> 
> nope.
> 
> > if not: would that be a useful feature for ruby to introduce?
> 
> perhaps, but I think it would be hard (impossible?) to do without  
> breaking this critical functionality:  
> [http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotallyValid.html](http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotallyValid.html)
> 
> o.0,  
> -Harold

Question: are these YelpsAndSqueals used much?
