5 questions from the last 7 days
0
votes
0
answers
43
views
Ruby Nokogiri Sax parser does not unescape & attribute
With the following code:
require 'nokogiri'
class MyDocument < Nokogiri::XML::SAX::Document
def start_element_namespace(name, attrs = [], prefix = nil, uri = nil, ns = [])
a = attrs.map ...
3
votes
0
answers
56
views
Heroku ruby buildpack breaks on second deployment push
I've upgraded Ruby from Ruby 3.1.7 to Ruby 3.2.8; after that, I've encountered a situation where my ruby bundle works for the first deployment on Heroku-deployed servers, but all subsequent ...
1
vote
1
answer
86
views
Negative Unix timestamp in Ruby
I have the following Unix timestamp:
time = Time.at(-8_640_000_000_000) # => -271821-04-19 19:00:00 -0500
time.strftime('%B %-d, %Y at %-I:%M %p') # => "April 19, -271821 at 7:00 PM"
...
Advice
0
votes
5
replies
48
views
Why are things magically available in the current scope in a ruby script in Jekyll?
My question could apply to many other ruby frameworks I guess. But here I have the case while programming a Jekyll project.
Let's see this Jekyll plugin as an example:
require 'dotenv'
module Jekyll
...
-3
votes
0
answers
46
views
How to convert a unicode value to a utf-8 character in Ruby 1.8.7 [duplicate]
I'm looking at the characters in this pdf:
https://www.unicode.org/charts/PDF/U1D100.pdf
For example, the treble clef symbol which has a unicode value of '1D120'
In ruby 1.8.7, how would i convert ...