CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 04:28:57 GMT
content-type: text/html; charset=utf-8
cf-ray: 965964982e3bd3d4-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=0f28ab15-2c8b-45d4-935d-033cb6f8653e; expires=Mon, 27 Jul 2026 04:28:57 GMT; domain=.stackexchange.com; path=/; secure; httponly
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: 3036bfb3-53e1-47e7-8448-a9db062903f2
x-worker-origin-response-time: 508000000
x-dns-prefetch-control: off
set-cookie: prov=0f28ab15-2c8b-45d4-935d-033cb6f8653e; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=RX1Zg9B0qpuMFO_G.1qzAQSSk24QuC5ShXatr4Eixbo-1753590537-1.0.1.1-dqohhH3qHvnTJpTNnllwjDuDkWADSCfqSAAeqI9SyB1uqoGqPbPcE04XGx3cgm02MgJT3XekPDmz0Pcgd8oKAxLBchk_Q4yq4ZviyipcwAs; path=/; expires=Sun, 27-Jul-25 04:58:57 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=qlFcd1H.ItXq_prIIq.zw6YwIfeqDnZTRmIu3zCvnyY-1753590537507-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
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
- Meaning of 芭蕉 in Tang age
- Balancing a Holy Water Bomb
- Is there such a thing as 'aerospace grade software'?
- What is the best way to bevel these corners without these deformations showing?
- how is it possible for a player to have crossed 2400 and secure 3+ IM norms to stay FM
- Why does my laptop's display turn off when I'm away from the keyboard?
- Did Denmark report that 64% Palestinian refugees from 1992 received serious fines or jail time?
- How do Francophones hear "ChatGPT"?
- Why exactly do full-flow rocket engine's turbopumps run cooler?
- What is the meaning of 'Tel.......,qui......'
- Early Sailing days in September 1066... Could Harold defeat William at Hastings, if it happened before Stamford Bridge?
- I don't understand Photos Library.photoslibrary
- When was the last time all alive humans stayed on earth?
- What does "enter the hold at arden" mean
- Upload open access pdfs or link to publisher for visibility?
- “Unclear step in a math book for entertainment”
- Did the first sin in the garden of Eden actually take place before the fruit was eaten?
- Regenerative cooling of rocket engine turbine's blades
- 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?
- Is it okay to email researchers if I’m a high school student?
- How can I turn the text in a PNG file back into text layer?
- Tracking stored procedure performance metrics
- A question about as ..... as comparison
- Story that taught cryptography in the form of a manga