# Easy question about inspect method

**URL:** <https://www.ruby-forum.com/t/easy-question-about-inspect-method/57083>\
**Category:** Ruby\
**Created:** [April 7, 2006, 3:00am UTC](https://www.ruby-forum.com/t/easy-question-about-inspect-method/57083 "2006-04-07T03:00:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazylester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/22d042/32.png) [@lazylester](https://www.ruby-forum.com/u/lazylester)\
**Post date:** [April 7, 2006, 3:00am UTC](https://www.ruby-forum.com/t/easy-question-about-inspect-method/57083/1 "2006-04-07T03:00:56Z")

</div>

When I use myarray.inspect, the result has some odd asymmetrical  
formatting, like:  
#nil, “role\_id”=\>“1”, “last”=\>“Normal”, “first”=\>“Norman”, “id”=\>“17”}\>

what is the significance of the # at the start, and the } and \> at the  
end of this myarray.inspect result?

thanks in advance

Les

---

<div class="post-metadata">

**Author:** ![lazylester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/22d042/32.png) [@lazylester](https://www.ruby-forum.com/u/lazylester)\
**Post date:** [April 7, 2006, 12:09pm UTC](https://www.ruby-forum.com/t/easy-question-about-inspect-method/57083/2 "2006-04-07T12:09:45Z")

</div>

On 4/7/06, Les N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Les
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Looks like  
(1) myarray is an Object having an instance method being a Hash  
(2) the # looks like a value of the hash is a method :nil  
(3) and it looks like the output was cut before the “#”

There is an alternative of course:

class Array  
def inspect  
“#nil, “role\_id”=\>“1”, “last”=\>“Normal”, “first”=\>“Norman”,  
“id”=\>“17”}\>”  
end  
end

which I consider unlikely

## Cheers Robert

Deux choses sont infinies : l’univers et la bÃªtise humaine ; en ce qui  
concerne l’univers, je n’en ai pas acquis la certitude absolue.

- Albert Einstein

---

<div class="post-metadata">

**Author:** ![lazylester](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/22d042/32.png) [@lazylester](https://www.ruby-forum.com/u/lazylester)\
**Post date:** [April 7, 2006, 12:12pm UTC](https://www.ruby-forum.com/t/easy-question-about-inspect-method/57083/3 "2006-04-07T12:12:47Z")

</div>

Typo(1) myarray is an Object having an instance method being a Hash  
==\>  
( 1) myarray is an Object having an instance being a Hash

How luck I proofread my posts after posting them, a practice I can only  
reccommend.

Sorry for the noise
