General

Profile

dstosik (David Stosik)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 2 2

Activity

03/14/2023

07:57 AM Ruby Bug #19530 (Closed): `Array#sum` and `Enumerable#sum` sometimes show different behaviours
Hi everyone. 👋🏻
We recently discovered that `Array#sum` and `Enumerable#sum` will output different results in some edge cases.
Here's the smallest script I managed to write to reproduce the issue:
``` ruby
class Money
def in...
dstosik (David Stosik)

03/29/2017

07:33 AM Ruby Bug #11430: Redefining a lazy-loaded variable in child context within RSpec spec causes crash
I believe this is related to an incorrect use of RSpec's `let`, and has nothing to do with Ruby. (=> **not a bug** here?)
When you write `let(:my_hash) { my_hash.merge!(key_two: 'val_two') }`, you **override** `:my_hash` in that local...
dstosik (David Stosik)
07:13 AM Ruby Bug #13106: Timeout does not wait for more than 120 seconds
**I think this is not a bug.**
It looks like you are catching the `Timeout::Error` raised by `Net::HTTP.get_response`.
Here is a sample code to illustrate this:
~~~ ruby
require 'timeout'
require 'benchmark'
require 'net/http...
dstosik (David Stosik)

01/28/2014

08:47 AM Ruby Bug #9457: Regexp: when using subexpression calls, returned match groups seem wrong
"Subexpression calls":http://www.ruby-doc.org/core-2.0/Regexp.html#class-Regexp-label-Subexpression+Calls dstosik (David Stosik)
08:32 AM Ruby Bug #9457 (Rejected): Regexp: when using subexpression calls, returned match groups seem wrong
Hello,
Here are a two examples:
/(Tarzan|Jane) loves (\g<1>)/.match("Tarzan loves Jane").to_a
#=> ["Tarzan loves Jane", "Jane", "Jane"]
# Expected: ["Tarzan loves Jane", "Tarzan", "Jane"]
(http://rubular.com/r/We2x...
dstosik (David Stosik)

Also available in: Atom