# Naming parameters in the method calls

**URL:** <https://www.ruby-forum.com/t/naming-parameters-in-the-method-calls/68528>\
**Category:** Ruby\
**Created:** [September 13, 2006, 12:00pm UTC](https://www.ruby-forum.com/t/naming-parameters-in-the-method-calls/68528 "2006-09-13T12:00:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eada6e/32.png) [@aidy](https://www.ruby-forum.com/u/aidy)\
**Post date:** [September 13, 2006, 12:00pm UTC](https://www.ruby-forum.com/t/naming-parameters-in-the-method-calls/68528/1 "2006-09-13T12:00:52Z")

</div>

Hi,

In BASIC, it is possible to name the parameters in the method calls

call:

test\_info(test\_description := “Check that window displayed is correct”,

```
    expected_result := "Correct image is displayed")

```

method

sub test\_info (test\_description, expected\_result)

Is it possible to do the same in Ruby?

Thanks for your help

aidy

---

<div class="post-metadata">

**Author:** ![aidy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eada6e/32.png) [@aidy](https://www.ruby-forum.com/u/aidy)\
**Post date:** [September 13, 2006, 12:10pm UTC](https://www.ruby-forum.com/t/naming-parameters-in-the-method-calls/68528/2 "2006-09-13T12:10:52Z")

</div>

On 13/09/06, aidy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> aidy

I do believe this might be a new feature in Ruby 2.0? I’m not sure if  
it’s confirmed though.

In the meantime you can kind of fake it using hashes. Ruby is clever  
enough to know when to convert an argument list to a hash like so:  
def talk(params)  
puts “Hello, I am #{params[:name]} and I am #{params[:age]} years  
old”  
end  
talk(:name=\>“Bob”,:age=\>27)

Farrel
