Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7195945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:40:54+00:00 2026-05-28T20:40:54+00:00

Going through the Active Support Core Extensions guide , it looks like some of

  • 0

Going through the Active Support Core Extensions guide, it looks like some of them are not available. Here’s verbatim output from a new session:

$ rails --version
Rails 3.1.3
$ rails console
[1] pry(main)> [].prepend(10)
NoMethodError: undefined method `prepend' for []:Array
from (pry):1:in `<main>'
[2] pry(main)> [].unshift(10)
=> [10]
[3] pry(main)> %w(a b c d).append('e')
NoMethodError: undefined method `append' for ["a", "b", "c", "d"]:Array
from (pry):3:in `<main>'
[4] pry(main)> %w(a b c d) << 'e'
=> ["a", "b", "c", "d", "e"]
[5] pry(main)> require 'active_support/core_ext/array'
=> false

There’s nothing indicating that append and prepend are deprecated or cutting-edge only, so what is happening here?

Looks like these are actually not part of Rails 3.1.3, because these fail:

$ grep 'prepend\|append' ~/.rvm/gems/ruby-1.9.3-p0@project_name/gems/activesupport-3.1.3/lib/active_support/core_ext/array/*
$ ls ~/.rvm/gems/ruby-1.9.3-p0@taclom/gems/activesupport-3.1.3/lib/active_support/core_ext/array/prepend_and_append.rb
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:40:55+00:00Added an answer on May 28, 2026 at 8:40 pm

    These methods were added in 3.2.0 and are nothing more than aliases to << and unshift respectively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Going through some of my older Delphi projects and upgrading them to D2009, as
I was going through Ryan Bates' video on Active Merchant integration video Railscast #145
Going through the microsoft authentication tutorial listed here they have you create a master
I am going through some pl/sql code with no comments. Trying to make sense
i was going through one of the python recipes in active state and found
I'm seeing some odd behaviour here using PrincipalContext.ValidateCredentials . The set-up is two Active
Going through Javascript documentation, I found the following two functions on a Javascript object
While going through university and from following the development of SO, I've heard a
After going through the Appendix A, C# Coding Style Conventions of the great book
While going through many resources on multithreaded programming, reference to volatile specifier usually comes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.