CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 13:22:28 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
cf-ray: 965c721eaab120c5-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=e801c360-4a10-4264-bfa9-103984880068; expires=Mon, 27 Jul 2026 13:22:28 GMT; domain=.stackexchange.com; path=/; secure; httponly
set-cookie: prov=e801c360-4a10-4264-bfa9-103984880068; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=.YwuDaFYBlxBwi5v9QbatHHheHhdcPNSx4vKfQenaSE-1753622548-1.0.1.1-0z3rSdlboI9otPT_nhTh7qX8J.mIsBFF9hvga9W5jHZGTH5zKNLhQIXTAU5VrrJhUOxzPeOZ3H1NbheIP7vbXIr3rHLoaPdD0a8lcxulxJQ; path=/; expires=Sun, 27-Jul-25 13:52:28 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=XsGGZKHaP85BbYUfUMREU5M.ij3UCycD2bD0HYESMqY-1753622548811-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 3ecabb17-a951-458e-9e8b-d25ce0c77699
x-worker-origin-response-time: 523000000
x-dns-prefetch-control: off
server: cloudflare
Newest 'ruby' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [ruby]
Ruby is a multi-platform, open-source, dynamic, object-oriented, interpreted language created by Yukihiro Matsumoto (Matz) in 1993.
1,613 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
20
views
Ruby Array#own_uniq method
I have implemented my own version of Ruby's Array uniq-method (Ruby docs - Class array) as a monkey patch on Array.
Method-impl.:
...
-4
votes
0
answers
118
views
LeetCode Problem: Find the Original Typed String II
LeetCode Problem:
Alice is attempting to type a specific string on her computer.
However, she tends to be clumsy and may press a key for too long,
resulting in a character being typed multiple times.
...
4
votes
2
answers
103
views
Ruby: Implement an 'add_thirty_days'-method
Task:
Implement a method, which receives an array of strings as argument. The strings are dates in the format "MM**DD**YYYY". For example: "11**03**2024".
Add 30 to each of the ...
6
votes
2
answers
429
views
(Codewars) Goldbach's Conjecture (by @rsalgado) in Ruby
Link to kata: linkRank: 6 kyuKata author: @rsalgado
I have been recently learning Ruby-lang and have been attempting to solve the following kata from Codewars involving Goldbach's Conjecture:
...
4
votes
2
answers
232
views
Ruby Array#own_shuffle method
I have tried to implement the Array-shuffle method myself. Haven't had a look on some similar algorithm-examples by purpose and tried to figure out something myself.
The actual Array-extension:
...
4
votes
1
answer
191
views
Fetching data from a REST-API then converting to CSV
I like to have a script which fetches data from a REST-API then writes the data into a CSV file.
Here's what I've got so far (prototype, using a publicly accessible dummy-API):
...
2
votes
1
answer
64
views
Ruby 'mkdir_reports'-script for creating folder-/file-structure automated
Initial situation: Each week a nested folder-/file-structure has to be created. Content is added to the files. Afterward the structure is copied to a shared-folder for long-time documentation.
Example:...
5
votes
3
answers
98
views
Ruby: Check for Palindrome (as Monkey-Patch on String-class)
I have written a method, which checks for Palindrome and attached it to the String-class.
Here's the code:
...
3
votes
0
answers
41
views
Using Pundit Policy Scopes with Searchkick Results
We are using Searchkick to run our elasticsearch and Pundit to authorize users for specific actions. Below is our module SearchkickScope that does it's best to ...
2
votes
1
answer
61
views
Rails session after migrate from PHP (improved)
previusly I make a post for Session Logic for User Verification in Rails Migration.
Now the improvement version following advice of the comments is here.
The problem was the use of `` for executing in ...
3
votes
1
answer
92
views
Session Logic for User Verification in Rails Migration
This is a logic to create sessions on RoR 7.1.2 based on the last version of the website which was in vanilla PHP, with the upgrade I have to deal with the users that were already signed up but not ...
1
vote
1
answer
103
views
Advent of Code Day 8
The task
A file similar to the following is provided.
...
1
vote
1
answer
63
views
Ruby-function for reading, parsing a text-file, removing data-duplicates
Task description:
Implement a generate_unique_phone_numbers function.
The function shall parse the given text-file.
Content-example:
...
3
votes
3
answers
153
views
Print last lines of file
Task
Write a Ruby function, which accepts a path to a text file and returns a string consisting of the last n lines in reversed order, separated by commas.
Example input file:
...
1
vote
1
answer
151
views
The simple calculator in Ruby
I wrote the simple calculator in Ruby. This is my first program in this language. I've switched recently from Python to Ruby. What do you think about my work? Thanks
...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
ruby-on-rails × 554
beginner × 162
algorithm × 88
object-oriented × 84
performance × 81
active-record × 80
rspec × 63
strings × 56
array × 54
datetime × 41
unit-testing × 39
game × 36
parsing × 30
regex × 30
controller × 29
validation × 27
time-limit-exceeded × 26
api × 24
comparative-review × 22
hash-map × 22
optimization × 22
sorting × 22
formatting × 21
file × 19
more related tags
Hot Network Questions
- Civilian airplanes with inside fuselage jet engines
- Extensions of diagonalizable, respectively multiplicative-type, groups
- Were the Fantastic Four the only superheroes on Earth-828 in The Fantastic Four: First Steps?
- Automatic drawing of polygon around selected polygons in QGIS
- What is the best way to bevel these corners without these deformations showing?
- Will this work as an XOR gate?
- Class for validating code in different Conda environments with PyTorch
- Statistics – Linear Inference – What is the moment generating function of non-central t-distribution?
- Why are police personnel of all ranks called officers?
- Humans on alien planet get tailed by silent humanoids
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- Tracking stored procedure performance metrics
- What's the difference between an eVisa and ETA travel authorization?
- Is there any verse which says that throughout the Vedas the praise of Shiva is sung?
- A question about as ..... as comparison
- Blinded despite Blindsight?
- Story that taught cryptography in the form of a manga
- Can Spi flash memory's contents be corrupted from heat?
- Is there such a thing as 'aerospace grade software'?
- Do TeX engines support Shavian OpenType fonts?
- how is it possible for a player to have crossed 2400 and secure 3+ IM norms to stay FM
- How can my dwarves keep humans from reverse engineering their technology?
- A national poll of 1000 French returns 25% of "Yes". Is it enough to say that it's quite impossible locally to be 0%, if we don't know the variance?
- Hypothetical copyleft exposure developer on proprietary project, legal?