• paholg@lemm.ee
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    3 months ago

    It could be Ruby; puts is more common, but there is a print. With some silly context, the answer could even be correct:

    #!/usr/bin/env ruby
    
    module DayLength
      def length
        if ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].include? self
          "24 hours"
        else
          super
        end
      end
    end
    
    class String
      prepend DayLength
    end
    
    day = "Monday"
    
    x = day.length
    
    print(x)