General

Profile

yxhuvud (Linus Sellberg)

  • Login: yxhuvud
  • Email: sellberg@gmail.com
  • Registered on: 12/14/2009
  • Last sign in: 09/28/2017

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 4 4

Activity

01/30/2017

12:51 PM Ruby Bug #13146: Float::NANs in Hashes are confusing (more than usual).
Nobuyoshi Nakada wrote:
> Are you suggesting to make infinities and a NaN multiton?
One alternative is to copy the approach given here: https://research.swtch.com/randhash
TLDR:
1: NaN is given a random hash (to avoid hash key...
yxhuvud (Linus Sellberg)

01/22/2017

09:31 PM Ruby Bug #13146: Float::NANs in Hashes are confusing (more than usual).
Robert A. Heiler wrote:
> To me I guess the surprise is that NAN in itself should be unique?
NaN is defined by IEEE to fail equality tests with all floats (including itself), so it could be argued it is more unique than any other v...
yxhuvud (Linus Sellberg)
03:46 PM Ruby Bug #13146 (Rejected): Float::NANs in Hashes are confusing (more than usual).
```ruby
test = {Float::NAN => 1, -Float::NAN => 2}
=> {NaN=>1, NaN=>2}
test.values_at(Float::NAN, -Float::NAN)
=> [1, nil]
```
I don't know what the correct behaviour ought to be, but it seems inconsistent to create a hash with...
yxhuvud (Linus Sellberg)

01/03/2016

11:53 PM Ruby Bug #11915: File.read reading string starting with | executes it.
Nobuyoshi Nakada wrote:
> Linus Sellberg wrote:
> ...
But File.read DOES. Which is what I find wrong. That File.open doesn't is another reason to not have .read do that.
yxhuvud (Linus Sellberg)

12/28/2015

11:24 PM Ruby Bug #11915 (Closed): File.read reading string starting with | executes it.
```ruby
puts File.read "|/bin/ls"
[output of executing ls]
=> nil
```
This is quite surprising behaviour.
It is one thing that some of the `.open` methods actually can execute stuff, but a method named 'read' should not behave li...
yxhuvud (Linus Sellberg)

04/02/2014

09:19 PM Ruby Bug #9695 (Rejected): Substring search exhibit quadratic behaviour.
http://nelhagedebugsshit.tumblr.com/post/81301884746/surveying-various-languages-string-search-algorithms
~~~ruby
12.upto(21).map do |i|
needle='a'*(2**(i-1)) + 'b'
haystack = 'a' * (2**i)
a = Time.now; haystack.include?(nee...
yxhuvud (Linus Sellberg)

12/14/2009

08:56 PM Ruby Bug #2479 (Third Party's Issue): bugs in ruby-mode
=begin
'"?' don't close string highlight.

"'?" emits the same error.

I tried searching for duplicates but failed to find any sane way of searching the issues, so I apologize if this is a duplicate error rep.
=end
yxhuvud (Linus Sellberg)

Also available in: Atom