Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit 46e2b52

Browse files
authored
Merge pull request #1281 from vt0r/i2f
[jRuby] - Allow floating points in quotas
2 parents 9de05f7 + ce3a5c0 commit 46e2b52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbooks/bcpc-hadoop/files/default/create_dirs.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ def string2long(s)
6767
'p' => 1024**5
6868
}
6969

70-
base = s[/[0-9.]*/].to_i
70+
base = s[/[0-9.]*/].to_f
7171
prefix = prefixes[s[/[kmgtp]/] || '']
7272

73-
base * prefix
73+
(base * prefix).ceil.to_i
7474
end
7575

7676
# set space and namespace quotas

0 commit comments

Comments
 (0)