General

Profile

foonlyboy (Eike Dierks)

  • Login: foonlyboy
  • Registered on: 09/22/2018
  • Last sign in: 12/20/2021

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 3 5 8

Activity

02/17/2021

06:07 PM Ruby Feature #17640 (Rejected): allow // for comments
- ruby uses '#' for comments (from the sh heritage)
- js and css use '//' for comments (from the C++ heritage)
I'd like to discuss,
to allow '//' in ruby code for comments
Motivation:
- writing comments is good
- it's cumbersom...
foonlyboy (Eike Dierks)

09/15/2020

07:07 PM Ruby Feature #17170 (Feedback): Numeric.zero, Numeric.one
Hi at the ruby team,
I'd like to suggest to enhance `Numeric` to provide two new class methods, which shall be: `zero` and `one`.
- `Integer.zero` shall be equal to `Integer(0)`
- `Float.zero` shall be equal to `Float(0)`
- `BigD...
foonlyboy (Eike Dierks)

05/05/2019

08:30 PM Ruby Feature #15829: Object#then_if(condition){}
A more complex example:
``` ruby
scope :blacklisted_at, -> (seller=nil, flag=true) {
then_if(! flag.nil?) {
joins(:disk_seller_maps)
.then_if(seller) {|q|
q.where(disk_seller_map:{seller_id:seller})
}
...
foonlyboy (Eike Dierks)
06:48 PM Ruby Feature #15829: Object#then_if(condition){}
A (somehow contrived) example:
``` ruby
[1,2,3,4,5].map{|n| n.then_if(n.even?){'even'}}
=> [1, "even", 3, "even", 5]
```
foonlyboy (Eike Dierks)
06:35 PM Ruby Feature #15829: Object#then_if(condition){}
``` ruby
class Object
def then_if(condition, &block)
if condition
self.then(&block)
else
self
end
end
end
```
foonlyboy (Eike Dierks)
06:26 PM Ruby Feature #15829 (Rejected): Object#then_if(condition){}
I'd like to propose some sugar to Object#then
There should be `Object#then_if(condition, &block)`

The block should only be applied when the condition is true,
otherwise the object should be returned without applying the block.
...
foonlyboy (Eike Dierks)

03/15/2019

01:41 AM Ruby Feature #15668 (Open): stdlib: Date - Time should return the difference in days
Hi at the ruby/stdlib,
Computing with times and dates is very complicated.
There are so many pitfalls lurking there.
I stumbled about a seemingly simple computation,
involving Date and Time
try:
Date.today - Time.now
=> Type...
foonlyboy (Eike Dierks)

12/27/2018

09:58 PM Ruby Misc #15474 (Rejected): Running Rails with jit
I have installed ruby-2.6.0
I want to try to run my rails app with the jit.
How can this be done?
I should try env RUBY_OPTS='--jit'
Is this the way the go?
The jit ist experimental, but promising,
so we need to try it wherever...
foonlyboy (Eike Dierks)

12/15/2018

06:43 PM Ruby Misc #15418 (Open): Date.parse('2018')
Date.parse('2018')
ArgumentError: invalid date
I did expect that to return the same as:
Date.parse('2018-1-1')
=> Mon, 01 Jan 2018
working with dates and times is really weird and complicated,
so it makes sense to be strict wit...
foonlyboy (Eike Dierks)

11/29/2018

01:08 AM Ruby Feature #14244: Better error messages for scripts with non-matching end statements
I fully agree with Martin that this is one of the most annoying problems.
I used ruby -w on my failing file and it told me (which was helpful)
~~~
333: warning: mismatched indentations at 'end' with 'if' at 332
523: warning: mism...
foonlyboy (Eike Dierks)

Also available in: Atom