Skip to content

Commit

Permalink
Fixed Ruby 2.5 compatibility
Browse files Browse the repository at this point in the history
Previous commit d54a6b7 broke Ruby 2.5 compatibility by using `Time#iso8601`. Patching it to use `Time#strftime` instead.
  • Loading branch information
ebababi authored Jul 18, 2024
1 parent d54a6b7 commit fce6060
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/iruby/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'iruby/session/mixin'

require 'securerandom'
require 'time'

module IRuby
class Session
Expand Down Expand Up @@ -80,7 +79,7 @@ def send(socket_type, message_type, content)
header = {
msg_type: message_type,
msg_id: SecureRandom.uuid,
date: Time.now.utc.iso8601,
date: Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ'),
username: 'kernel',
session: @session_id,
version: '5.0'
Expand Down

0 comments on commit fce6060

Please sign in to comment.