diff options
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 |