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 6669381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:08:35+00:00 2026-05-26T03:08:35+00:00

Is there a class or other extension for Rails that allows more than the

  • 0

Is there a class or other extension for Rails that allows more than the first few elements in a series (and the last)? These work:

[2,45,2,14,53,23,634,346,34,46,643,634,346,34,34].fifth
# -> 53
[2,45,2,14,53,23,634,346,34,46,643,634,346,34,34].last
# -> 34

so where is?

list.sixth
list.hundredth 
  • 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-26T03:08:36+00:00Added an answer on May 26, 2026 at 3:08 am

    There was a time when Rails added these, but there was a lot of controversy so most were removed. The only remnant of this experiment is Array#forty_two:

    (1..100).to_a.forty_two
    # => 42
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a good class repository like PEAR for PHP for other languages such
I'm working in a class library and there are other source projects associated with
Delphi (and probably a lot of other languages) has class helpers. These provide a
Is there any class in the .NET framework that can read/write standard .ini files:
Is there a class in the standard library of .NET that gives me the
Is there a class/example application for a message-only window that is in C++ Win32
Is there a class that overwrites the .MainMenu_MenuItem class for the Main Menu? I
Is there a class in the ASP.NET MVC framework that represents a controller name
I realize that there are other posts asking similar questions, but do not quite
Is there a __CLASS__ macro in C++ which gives the class name similar to

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.