Skip to content

Commit e2dd902

Browse files
committed
fix code_point_limit for current ruby version
1 parent 1d0768c commit e2dd902

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/gooddata/rest/connection.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class Connection
3333
TOKEN_PATH = '/gdc/account/token'
3434
KEYS_TO_SCRUB = [:password, :verifyPassword, :authorizationToken]
3535
API_LEVEL = 2
36+
KB = 1024
37+
MB = 1024 * KB
3638

3739
ID_LENGTH = 16
3840

@@ -177,8 +179,8 @@ def initialize(opts)
177179

178180
# Connect using username and password
179181
def connect(username, password, options = {})
180-
if RUBY_VERSION >= '3.3'
181-
Psych::Parser.code_point_limit = 100_000_000_000
182+
if RUBY_VERSION >= '3.1'
183+
Psych::Parser.code_point_limit = 100 * MB
182184
end
183185
server = options[:server] || Helpers::AuthHelper.read_server
184186
options = DEFAULT_LOGIN_PAYLOAD.merge(options)

0 commit comments

Comments
 (0)