diff options
author | guy Decoux <ts@moulon.inra.fr> | 2009-02-28 20:08:24 +0100 |
---|---|---|
committer | guy Decoux <ts@moulon.inra.fr> | 2009-02-28 20:08:24 +0100 |
commit | a181d44ee4b78d7e016cf5b9e8fd5591723615bd (patch) | |
tree | b78f0d2b978a9df55acd5dfd222ceebfcbc50c03 /mmap.rd | |
parent | ddd4bfbddf5d2972f5eaf47bc6b89d154203f45f (diff) | |
download | mmap-ruby-a181d44ee4b78d7e016cf5b9e8fd5591723615bd.zip mmap-ruby-a181d44ee4b78d7e016cf5b9e8fd5591723615bd.tar.gz |
mmap-0.1.8
Diffstat (limited to 'mmap.rd')
-rw-r--r-- | mmap.rd | 126 |
1 files changed, 67 insertions, 59 deletions
@@ -3,10 +3,12 @@ ((<Download|URL:ftp://moulon.inra.fr/pub/ruby/>)) +#^ The Mmap class implement memory-mapped file objects === WARNING -((*The variables $' and $` are not available with gsub! and sub!*)) +=== The variables $' and $` are not available with gsub! and sub! +#^ == SuperClass @@ -16,15 +18,19 @@ Object * Comparable * Enumerable - +# class Mmap +# include Comparable +# include Enumerable +# class << self == Class Methods --- lockall(flag) disable paging of all pages mapped. ((|flag|)) can be ((|Mmap::MCL_CURRENT|)) or ((|Mmap::MCL_FUTURE|)) ---- new(file, [mode [, protection [, options]]]) - create a new object +--- new(file, mode = "r", protection = Mmap::MAP_SHARED, options = {}) +--- new(nil, length, protection = Mmap::MAP_SHARED, options = {}) + create a new Mmap object : ((|file|)) Pathname of the file, if ((|nil|)) is given an anonymous map @@ -63,6 +69,7 @@ Object --- unlockall reenable paging +# end == Methods --- extend(count) @@ -89,114 +96,115 @@ Object --- munmap terminate the association -=== Other methods with the same syntax than the methods of ((|String|)) +=== Other methods with the same syntax than for the class String + -self == other +--- self == other -self > other +--- self > other -self >= other +--- self >= other -self < other +--- self < other -self <= other +--- self <= other -self === other +--- self === other -self << other +--- self << other -self =~ other +--- self =~ other -self[nth] +--- self[nth] -self[start..last] +--- self[start..last] -self[start, length] +--- self[start, length] -self[nth] = val +--- self[nth] = val -self[start..last] = val +--- self[start..last] = val -self[start, len] = val +--- self[start, len] = val -self <=> other +--- self <=> other -<<(other) +--- <<(other) -casecmp(other) >= 1.7.1 +--- casecmp(other) >= 1.7.1 -concat(other) +--- concat(other) -capitalize! +--- capitalize! -chop! +--- chop! -chomp!([rs]) +--- chomp!([rs]) -count(o1 [, o2, ...]) +--- count(o1 [, o2, ...]) -crypt(salt) +--- crypt(salt) -delete!(str) +--- delete!(str) -downcase! +--- downcase! -each_byte {|char|...} +--- each_byte {|char|...} -each([rs]) {|line|...} +--- each([rs]) {|line|...} -each_line([rs]) {|line|...} +--- each_line([rs]) {|line|...} -empty? +--- empty? -freeze +--- freeze -frozen +--- frozen -gsub!(pattern, replace) +--- gsub!(pattern, replace) -gsub!(pattern) {...} +--- gsub!(pattern) {|str|...} -include?(other) +--- include?(other) -index(substr[, pos]) +--- index(substr[, pos]) -insert(index, str) >= 1.7.1 +--- insert(index, str) >= 1.7.1 -length +--- length -reverse! +--- reverse! -rindex(substr[, pos]) +--- rindex(substr[, pos]) -scan(pattern) +--- scan(pattern) -scan(pattern) {...} +--- scan(pattern) {|str| ...} -size +--- size -slice +--- slice -slice! +--- slice! -split([sep[, limit]]) +--- split([sep[, limit]]) -squeeze!([str]) +--- squeeze!([str]) -strip! +--- strip! -sub!(pattern, replace) +--- sub!(pattern, replace) -sub!(pattern) {...} +--- sub!(pattern) {|str| ...} -sum([bits]) +--- sum([bits]) -swapcase! +--- swapcase! -tr!(search, replace) +--- tr!(search, replace) -tr_s!(search, replace) +--- tr_s!(search, replace) -upcase! +--- upcase! =end |