# Enumerable#inject is surprising me

**URL:** <https://rubytalk.org/t/enumerable-inject-is-surprising-me/8436>\
**Category:** ruby-talk\
**Created:** [6 October 2003 23:29 UTC](https://rubytalk.org/t/enumerable-inject-is-surprising-me/8436 "2003-10-06T23:29:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathaniel\_Talbott](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@Nathaniel\_Talbott](https://rubytalk.org/u/Nathaniel_Talbott)\
**Post date:** [6 October 2003 23:29 UTC](https://rubytalk.org/t/enumerable-inject-is-surprising-me/8436/1 "2003-10-06T23:29:08Z")

</div>

Does it surprise you?

irb(main):001:0\> [‘a’].inject{break ‘b’}  
=\> “a”

I expected “b” as the result. Is this intendend behavior? If so, what is the  
rationale behind it, and how do I force #inject to immediately return a  
given value?

Thanks,

Nathaniel

\<:((\>\<
