Skip to content

include? somehow does not include - and loops too #173

@wdiechmann

Description

@wdiechmann

I may very well be barking up the wrong tree here - after giving up on IceCube (actually I've gone back and forth between the two of you, IceCube and Montrose, for a few days now, trying to get it to work), but here goes -

I'm on Rails 8.0.0.alpha, and Ruby 3.2.2, and Montrose 0.16., on a macbook Air macOS Sonoma 14.5 (the one with range anxiety; panic booting when you leave it alone), and I get this in my console:

mortimer(dev)> re
=> #<Montrose::Recurrence:e0024 {:every=>:week, :during=>[[[8, 0, 0], [14, 55, 0]]], :day=>[2, 3]}>
mortimer(dev)> tm
=> Tue, 09 Jul 2024 14:04:49 +0200
mortimer(dev)> tm2
=> Tue, 09 Jul 2024 15:04:49 +0200
mortimer(dev)> re.events.take 1
=> [Tue, 09 Jul 2024 12:37:32.000000000 UTC +00:00]
mortimer(dev)> re.include? tm
=> false
mortimer(dev)> re.include? tm2
^C(mortimer):48:in `<main>': abort then interrupt! (IRB::Abort)
mortimer(dev)> tm.class
=> DateTime
mortimer(dev)> tm2.class
=> DateTime

I would've expected re.include? tm to return true and re.include? tm2 to report false.

Any ideas, hints, caveats?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions