rb2exe 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1008) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +22 -0
  3. data/README.md +18 -22
  4. data/bin/build +24 -0
  5. data/bin/decompress +17 -0
  6. data/bin/installer +19 -0
  7. data/bin/rb2exe +3 -0
  8. data/bin/rb2exe.rb +49 -0
  9. data/bin/traveling-ruby-2.2.2/bin.real/bundle +23 -0
  10. data/bin/traveling-ruby-2.2.2/bin.real/bundler +23 -0
  11. data/bin/traveling-ruby-2.2.2/bin.real/gem +25 -0
  12. data/bin/traveling-ruby-2.2.2/bin.real/irb +11 -0
  13. data/bin/traveling-ruby-2.2.2/bin.real/nokogiri +23 -0
  14. data/bin/traveling-ruby-2.2.2/bin.real/posix-spawn-benchmark +23 -0
  15. data/bin/traveling-ruby-2.2.2/bin.real/puma +23 -0
  16. data/bin/traveling-ruby-2.2.2/bin.real/pumactl +23 -0
  17. data/bin/traveling-ruby-2.2.2/bin.real/rackup +23 -0
  18. data/bin/traveling-ruby-2.2.2/bin.real/rake +33 -0
  19. data/bin/traveling-ruby-2.2.2/bin.real/redcarpet +23 -0
  20. data/bin/traveling-ruby-2.2.2/bin.real/redcloth +23 -0
  21. data/bin/traveling-ruby-2.2.2/bin.real/ruby +0 -0
  22. data/bin/traveling-ruby-2.2.2/bin.real/thin +23 -0
  23. data/bin/traveling-ruby-2.2.2/bin.real/unicorn +23 -0
  24. data/bin/traveling-ruby-2.2.2/bin.real/unicorn_rails +23 -0
  25. data/bin/traveling-ruby-2.2.2/bin/gem +6 -0
  26. data/bin/traveling-ruby-2.2.2/bin/irb +6 -0
  27. data/bin/traveling-ruby-2.2.2/bin/rake +6 -0
  28. data/bin/traveling-ruby-2.2.2/bin/ruby +6 -0
  29. data/bin/traveling-ruby-2.2.2/bin/ruby_environment +33 -0
  30. data/bin/traveling-ruby-2.2.2/info/GEM_EXTENSION_API_VERSION +1 -0
  31. data/bin/traveling-ruby-2.2.2/info/GEM_PLATFORM +1 -0
  32. data/bin/traveling-ruby-2.2.2/info/RUBY_ARCH +1 -0
  33. data/bin/traveling-ruby-2.2.2/info/RUBY_COMPAT_VERSION +1 -0
  34. data/bin/traveling-ruby-2.2.2/lib/ca-bundle.crt +13885 -0
  35. data/bin/traveling-ruby-2.2.2/lib/libffi.so.6 +0 -0
  36. data/bin/traveling-ruby-2.2.2/lib/libreadline.so.5 +0 -0
  37. data/bin/traveling-ruby-2.2.2/lib/libtermcap.so.2 +0 -0
  38. data/bin/traveling-ruby-2.2.2/lib/libz.so.1 +0 -0
  39. data/bin/traveling-ruby-2.2.2/lib/restore_environment.rb +17 -0
  40. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/English.rb +185 -0
  41. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/abbrev.rb +131 -0
  42. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/base64.rb +91 -0
  43. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/benchmark.rb +557 -0
  44. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/jacobian.rb +87 -0
  45. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/ludcmp.rb +88 -0
  46. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/math.rb +231 -0
  47. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/newton.rb +79 -0
  48. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/bigdecimal/util.rb +127 -0
  49. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi.rb +295 -0
  50. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/cookie.rb +170 -0
  51. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/core.rb +880 -0
  52. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/html.rb +1034 -0
  53. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/session.rb +531 -0
  54. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/session/pstore.rb +100 -0
  55. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cgi/util.rb +194 -0
  56. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/cmath.rb +400 -0
  57. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/csv.rb +2341 -0
  58. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/date.rb +60 -0
  59. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/debug.rb +1087 -0
  60. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/delegate.rb +417 -0
  61. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/digest.rb +108 -0
  62. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/digest/sha2.rb +107 -0
  63. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb.rb +2 -0
  64. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/acl.rb +232 -0
  65. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/drb.rb +1864 -0
  66. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/eq.rb +14 -0
  67. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/extserv.rb +43 -0
  68. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/extservm.rb +93 -0
  69. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/gw.rb +160 -0
  70. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/invokemethod.rb +34 -0
  71. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/observer.rb +25 -0
  72. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/ssl.rb +345 -0
  73. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/timeridconv.rb +101 -0
  74. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/drb/unix.rb +117 -0
  75. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/e2mmap.rb +172 -0
  76. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/erb.rb +1022 -0
  77. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/expect.rb +71 -0
  78. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle.rb +55 -0
  79. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/closure.rb +48 -0
  80. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/cparser.rb +176 -0
  81. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/function.rb +17 -0
  82. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/import.rb +314 -0
  83. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/pack.rb +128 -0
  84. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/struct.rb +243 -0
  85. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/types.rb +71 -0
  86. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fiddle/value.rb +112 -0
  87. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/fileutils.rb +1761 -0
  88. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/find.rb +88 -0
  89. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/forwardable.rb +289 -0
  90. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/getoptlong.rb +612 -0
  91. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/bigdecimal.so +0 -0
  92. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/continuation.so +0 -0
  93. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/date_core.so +0 -0
  94. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest.so +0 -0
  95. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/bubblebabble.so +0 -0
  96. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/md5.so +0 -0
  97. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/rmd160.so +0 -0
  98. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so +0 -0
  99. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha2.so +0 -0
  100. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/big5.so +0 -0
  101. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/cp949.so +0 -0
  102. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/emacs_mule.so +0 -0
  103. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/encdb.so +0 -0
  104. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_jp.so +0 -0
  105. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_kr.so +0 -0
  106. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/euc_tw.so +0 -0
  107. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gb18030.so +0 -0
  108. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gb2312.so +0 -0
  109. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/gbk.so +0 -0
  110. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_1.so +0 -0
  111. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_10.so +0 -0
  112. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_11.so +0 -0
  113. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_13.so +0 -0
  114. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_14.so +0 -0
  115. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_15.so +0 -0
  116. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_16.so +0 -0
  117. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_2.so +0 -0
  118. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_3.so +0 -0
  119. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_4.so +0 -0
  120. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_5.so +0 -0
  121. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_6.so +0 -0
  122. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_7.so +0 -0
  123. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_8.so +0 -0
  124. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/iso_8859_9.so +0 -0
  125. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/koi8_r.so +0 -0
  126. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/koi8_u.so +0 -0
  127. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/shift_jis.so +0 -0
  128. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/big5.so +0 -0
  129. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/chinese.so +0 -0
  130. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji.so +0 -0
  131. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_iso2022_kddi.so +0 -0
  132. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_docomo.so +0 -0
  133. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_kddi.so +0 -0
  134. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/emoji_sjis_softbank.so +0 -0
  135. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/escape.so +0 -0
  136. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/gb18030.so +0 -0
  137. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/gbk.so +0 -0
  138. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/iso2022.so +0 -0
  139. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese.so +0 -0
  140. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese_euc.so +0 -0
  141. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/japanese_sjis.so +0 -0
  142. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/korean.so +0 -0
  143. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/single_byte.so +0 -0
  144. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/transdb.so +0 -0
  145. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/utf8_mac.so +0 -0
  146. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/trans/utf_16_32.so +0 -0
  147. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_16be.so +0 -0
  148. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_16le.so +0 -0
  149. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_32be.so +0 -0
  150. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/utf_32le.so +0 -0
  151. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/windows_1251.so +0 -0
  152. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/enc/windows_31j.so +0 -0
  153. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/etc.so +0 -0
  154. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fcntl.so +0 -0
  155. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fiber.so +0 -0
  156. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/fiddle.so +0 -0
  157. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/console.so +0 -0
  158. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/nonblock.so +0 -0
  159. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/io/wait.so +0 -0
  160. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/json/ext/generator.so +0 -0
  161. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/json/ext/parser.so +0 -0
  162. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/mathn/complex.so +0 -0
  163. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/mathn/rational.so +0 -0
  164. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/nkf.so +0 -0
  165. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/objspace.so +0 -0
  166. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/openssl.so +0 -0
  167. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/pathname.so +0 -0
  168. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/psych.so +0 -0
  169. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/pty.so +0 -0
  170. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/racc/cparse.so +0 -0
  171. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/rbconfig.rb +279 -0
  172. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/rbconfig/sizeof.so +0 -0
  173. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/readline.so +0 -0
  174. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/ripper.so +0 -0
  175. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/socket.so +0 -0
  176. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/stringio.so +0 -0
  177. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/strscan.so +0 -0
  178. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/syslog.so +0 -0
  179. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/thread.so +0 -0
  180. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/i686-linux/zlib.so +0 -0
  181. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/io/console/size.rb +22 -0
  182. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ipaddr.rb +658 -0
  183. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb.rb +703 -0
  184. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/chws.rb +33 -0
  185. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/fork.rb +38 -0
  186. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/help.rb +41 -0
  187. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/load.rb +66 -0
  188. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/nop.rb +38 -0
  189. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/pushws.rb +40 -0
  190. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/cmd/subirb.rb +42 -0
  191. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/completion.rb +227 -0
  192. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/context.rb +419 -0
  193. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/change-ws.rb +45 -0
  194. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/history.rb +118 -0
  195. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/loader.rb +128 -0
  196. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/math-mode.rb +47 -0
  197. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/multi-irb.rb +265 -0
  198. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/save-history.rb +103 -0
  199. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/tracer.rb +71 -0
  200. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/use-loader.rb +73 -0
  201. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ext/workspaces.rb +66 -0
  202. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/extend-command.rb +308 -0
  203. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/frame.rb +80 -0
  204. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/help.rb +36 -0
  205. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/init.rb +304 -0
  206. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/input-method.rb +191 -0
  207. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/inspector.rb +131 -0
  208. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/error.rb +31 -0
  209. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/help-message +50 -0
  210. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/encoding_aliases.rb +10 -0
  211. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/error.rb +30 -0
  212. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/lc/ja/help-message +53 -0
  213. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/locale.rb +181 -0
  214. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/magic-file.rb +37 -0
  215. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/notifier.rb +231 -0
  216. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/output-method.rb +91 -0
  217. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ruby-lex.rb +1170 -0
  218. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ruby-token.rb +266 -0
  219. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/slex.rb +281 -0
  220. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/src_encoding.rb +4 -0
  221. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/version.rb +15 -0
  222. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/workspace.rb +114 -0
  223. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/ws-for-case-2.rb +14 -0
  224. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/irb/xmp.rb +169 -0
  225. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json.rb +62 -0
  226. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/bigdecimal.rb +28 -0
  227. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/complex.rb +22 -0
  228. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/core.rb +11 -0
  229. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/date.rb +34 -0
  230. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/date_time.rb +50 -0
  231. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/exception.rb +31 -0
  232. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/ostruct.rb +31 -0
  233. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/range.rb +29 -0
  234. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/rational.rb +22 -0
  235. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/regexp.rb +30 -0
  236. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/struct.rb +30 -0
  237. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/symbol.rb +25 -0
  238. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/add/time.rb +38 -0
  239. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/common.rb +484 -0
  240. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/ext.rb +21 -0
  241. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/generic_object.rb +70 -0
  242. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/json/version.rb +8 -0
  243. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/kconv.rb +282 -0
  244. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/logger.rb +737 -0
  245. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mathn.rb +191 -0
  246. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix.rb +2161 -0
  247. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix/eigenvalue_decomposition.rb +882 -0
  248. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/matrix/lup_decomposition.rb +218 -0
  249. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mkmf.rb +2677 -0
  250. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/monitor.rb +300 -0
  251. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/mutex_m.rb +111 -0
  252. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/ftp.rb +1126 -0
  253. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http.rb +1559 -0
  254. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/backward.rb +25 -0
  255. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/exceptions.rb +25 -0
  256. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/generic_request.rb +332 -0
  257. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/header.rb +452 -0
  258. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/proxy_delta.rb +16 -0
  259. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/request.rb +20 -0
  260. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/requests.rb +122 -0
  261. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/response.rb +414 -0
  262. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/http/responses.rb +273 -0
  263. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/https.rb +22 -0
  264. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/imap.rb +3616 -0
  265. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/pop.rb +1021 -0
  266. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/protocol.rb +420 -0
  267. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/smtp.rb +1073 -0
  268. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/net/telnet.rb +763 -0
  269. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/observer.rb +203 -0
  270. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb +801 -0
  271. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/open3.rb +663 -0
  272. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl.rb +24 -0
  273. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/bn.rb +45 -0
  274. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/buffering.rb +457 -0
  275. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/cipher.rb +65 -0
  276. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/config.rb +472 -0
  277. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/digest.rb +88 -0
  278. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/ssl.rb +308 -0
  279. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/openssl/x509.rb +182 -0
  280. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optionparser.rb +1 -0
  281. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse.rb +1997 -0
  282. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/ac.rb +50 -0
  283. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/date.rb +17 -0
  284. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/shellwords.rb +6 -0
  285. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/time.rb +10 -0
  286. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/uri.rb +6 -0
  287. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/optparse/version.rb +70 -0
  288. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ostruct.rb +286 -0
  289. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pathname.rb +579 -0
  290. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pp.rb +546 -0
  291. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/prettyprint.rb +554 -0
  292. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/prime.rb +487 -0
  293. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/profile.rb +10 -0
  294. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/profiler.rb +148 -0
  295. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/pstore.rb +484 -0
  296. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych.rb +498 -0
  297. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/class_loader.rb +101 -0
  298. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/coder.rb +94 -0
  299. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/core_ext.rb +35 -0
  300. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/deprecated.rb +85 -0
  301. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/exception.rb +13 -0
  302. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handler.rb +249 -0
  303. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handlers/document_stream.rb +22 -0
  304. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/handlers/recorder.rb +39 -0
  305. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/ruby_events.rb +19 -0
  306. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/stream.rb +16 -0
  307. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/tree_builder.rb +12 -0
  308. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/json/yaml_events.rb +29 -0
  309. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes.rb +77 -0
  310. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/alias.rb +18 -0
  311. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/document.rb +60 -0
  312. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/mapping.rb +56 -0
  313. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/node.rb +55 -0
  314. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/scalar.rb +67 -0
  315. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/sequence.rb +81 -0
  316. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/nodes/stream.rb +37 -0
  317. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/omap.rb +4 -0
  318. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/parser.rb +51 -0
  319. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/scalar_scanner.rb +149 -0
  320. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/set.rb +4 -0
  321. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/stream.rb +37 -0
  322. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/streaming.rb +27 -0
  323. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/syntax_error.rb +21 -0
  324. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/tree_builder.rb +96 -0
  325. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors.rb +6 -0
  326. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/depth_first.rb +26 -0
  327. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/emitter.rb +51 -0
  328. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/json_tree.rb +24 -0
  329. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/to_ruby.rb +389 -0
  330. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/visitor.rb +19 -0
  331. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/visitors/yaml_tree.rb +565 -0
  332. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/psych/y.rb +9 -0
  333. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/racc/parser.rb +622 -0
  334. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake.rb +79 -0
  335. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/alt_system.rb +110 -0
  336. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb +790 -0
  337. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/backtrace.rb +23 -0
  338. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/clean.rb +76 -0
  339. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/cloneable.rb +16 -0
  340. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/compositepublisher.rb +21 -0
  341. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/ftptools.rb +137 -0
  342. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/publisher.rb +81 -0
  343. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/rubyforgepublisher.rb +18 -0
  344. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/sshpublisher.rb +61 -0
  345. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/contrib/sys.rb +4 -0
  346. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/cpu_counter.rb +125 -0
  347. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/default_loader.rb +14 -0
  348. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/dsl_definition.rb +201 -0
  349. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/early_time.rb +21 -0
  350. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/core.rb +25 -0
  351. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/module.rb +2 -0
  352. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/pathname.rb +25 -0
  353. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/string.rb +173 -0
  354. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ext/time.rb +16 -0
  355. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_creation_task.rb +24 -0
  356. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_list.rb +428 -0
  357. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_task.rb +46 -0
  358. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_utils.rb +128 -0
  359. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/file_utils_ext.rb +144 -0
  360. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/gempackagetask.rb +4 -0
  361. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/invocation_chain.rb +56 -0
  362. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/invocation_exception_mixin.rb +16 -0
  363. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/late_time.rb +17 -0
  364. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/linked_list.rb +103 -0
  365. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/loaders/makefile.rb +40 -0
  366. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/multi_task.rb +13 -0
  367. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/name_space.rb +38 -0
  368. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/packagetask.rb +199 -0
  369. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/pathmap.rb +3 -0
  370. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/phony.rb +15 -0
  371. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/private_reader.rb +20 -0
  372. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/promise.rb +99 -0
  373. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/pseudo_status.rb +29 -0
  374. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rake_module.rb +38 -0
  375. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rake_test_loader.rb +22 -0
  376. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rdoctask.rb +4 -0
  377. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/ruby182_test_unit_fix.rb +29 -0
  378. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/rule_recursion_overflow_error.rb +20 -0
  379. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/runtest.rb +27 -0
  380. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/scope.rb +42 -0
  381. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task.rb +383 -0
  382. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_argument_error.rb +7 -0
  383. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_arguments.rb +98 -0
  384. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/task_manager.rb +310 -0
  385. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/tasklib.rb +24 -0
  386. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/testtask.rb +212 -0
  387. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/thread_history_display.rb +48 -0
  388. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/thread_pool.rb +164 -0
  389. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/trace_output.rb +22 -0
  390. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/version.rb +7 -0
  391. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rake/win32.rb +56 -0
  392. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rbconfig/datadir.rb +13 -0
  393. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc.rb +185 -0
  394. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/alias.rb +111 -0
  395. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/anon_class.rb +10 -0
  396. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/any_method.rb +316 -0
  397. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/attr.rb +175 -0
  398. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/class_module.rb +799 -0
  399. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/code_object.rb +429 -0
  400. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/code_objects.rb +5 -0
  401. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/comment.rb +229 -0
  402. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/constant.rb +186 -0
  403. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/context.rb +1211 -0
  404. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/context/section.rb +238 -0
  405. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/cross_reference.rb +183 -0
  406. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/encoding.rb +99 -0
  407. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/erb_partial.rb +18 -0
  408. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/erbio.rb +37 -0
  409. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/extend.rb +9 -0
  410. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/generator.rb +51 -0
  411. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ghost_method.rb +6 -0
  412. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n.rb +9 -0
  413. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n/locale.rb +101 -0
  414. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/i18n/text.rb +125 -0
  415. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/include.rb +9 -0
  416. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/known_classes.rb +72 -0
  417. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown.rb +16133 -0
  418. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown/entities.rb +2131 -0
  419. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markdown/literals_1_9.rb +420 -0
  420. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup.rb +869 -0
  421. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attr_changer.rb +22 -0
  422. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attr_span.rb +29 -0
  423. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attribute_manager.rb +343 -0
  424. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/attributes.rb +70 -0
  425. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/blank_line.rb +27 -0
  426. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/block_quote.rb +14 -0
  427. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/document.rb +164 -0
  428. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/formatter.rb +264 -0
  429. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/formatter_test_case.rb +767 -0
  430. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/hard_break.rb +31 -0
  431. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/heading.rb +78 -0
  432. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/include.rb +42 -0
  433. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/indented_paragraph.rb +47 -0
  434. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/inline.rb +1 -0
  435. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/list.rb +101 -0
  436. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/list_item.rb +99 -0
  437. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/paragraph.rb +28 -0
  438. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/parser.rb +558 -0
  439. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/pre_process.rb +293 -0
  440. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/raw.rb +69 -0
  441. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/rule.rb +20 -0
  442. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/special.rb +40 -0
  443. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/text_formatter_test_case.rb +114 -0
  444. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_ansi.rb +93 -0
  445. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_bs.rb +78 -0
  446. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html.rb +398 -0
  447. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html_crossref.rb +160 -0
  448. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_html_snippet.rb +284 -0
  449. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_joined_paragraph.rb +71 -0
  450. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_label.rb +74 -0
  451. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_markdown.rb +191 -0
  452. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_rdoc.rb +333 -0
  453. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_table_of_contents.rb +87 -0
  454. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_test.rb +69 -0
  455. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/to_tt_only.rb +120 -0
  456. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/markup/verbatim.rb +83 -0
  457. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/meta_method.rb +6 -0
  458. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/method_attr.rb +418 -0
  459. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/mixin.rb +120 -0
  460. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/normal_class.rb +92 -0
  461. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/normal_module.rb +73 -0
  462. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/options.rb +1251 -0
  463. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser.rb +310 -0
  464. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/c.rb +1229 -0
  465. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/changelog.rb +198 -0
  466. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/markdown.rb +23 -0
  467. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/rd.rb +22 -0
  468. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/ruby.rb +2160 -0
  469. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/ruby_tools.rb +167 -0
  470. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/simple.rb +61 -0
  471. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/parser/text.rb +11 -0
  472. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd.rb +99 -0
  473. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/block_parser.rb +1055 -0
  474. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/inline.rb +71 -0
  475. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rd/inline_parser.rb +1207 -0
  476. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rdoc.rb +570 -0
  477. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/require.rb +51 -0
  478. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri.rb +20 -0
  479. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/driver.rb +1497 -0
  480. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/formatter.rb +5 -0
  481. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/paths.rb +187 -0
  482. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/store.rb +6 -0
  483. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ri/task.rb +71 -0
  484. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ruby_lex.rb +1377 -0
  485. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/ruby_token.rb +460 -0
  486. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/rubygems_hook.rb +253 -0
  487. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/servlet.rb +441 -0
  488. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/single_class.rb +25 -0
  489. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats.rb +461 -0
  490. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/normal.rb +59 -0
  491. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/quiet.rb +59 -0
  492. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/stats/verbose.rb +45 -0
  493. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/store.rb +979 -0
  494. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/task.rb +330 -0
  495. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/test_case.rb +217 -0
  496. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/text.rb +324 -0
  497. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/token_stream.rb +95 -0
  498. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/tom_doc.rb +257 -0
  499. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rdoc/top_level.rb +282 -0
  500. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/resolv-replace.rb +74 -0
  501. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/resolv.rb +2836 -0
  502. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/attlistdecl.rb +62 -0
  503. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/attribute.rb +191 -0
  504. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/cdata.rb +67 -0
  505. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/child.rb +96 -0
  506. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/comment.rb +79 -0
  507. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/doctype.rb +269 -0
  508. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/document.rb +290 -0
  509. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/attlistdecl.rb +10 -0
  510. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/dtd.rb +46 -0
  511. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/elementdecl.rb +17 -0
  512. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/entitydecl.rb +56 -0
  513. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/dtd/notationdecl.rb +39 -0
  514. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/element.rb +1240 -0
  515. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/encoding.rb +50 -0
  516. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/entity.rb +173 -0
  517. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/default.rb +111 -0
  518. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/pretty.rb +141 -0
  519. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/formatters/transitive.rb +57 -0
  520. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/functions.rb +394 -0
  521. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/instruction.rb +70 -0
  522. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/light/node.rb +195 -0
  523. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/namespace.rb +47 -0
  524. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/node.rb +75 -0
  525. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/output.rb +29 -0
  526. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parent.rb +165 -0
  527. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parseexception.rb +51 -0
  528. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/baseparser.rb +532 -0
  529. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/lightparser.rb +58 -0
  530. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/pullparser.rb +196 -0
  531. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/sax2parser.rb +272 -0
  532. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/streamparser.rb +52 -0
  533. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/treeparser.rb +100 -0
  534. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/ultralightparser.rb +56 -0
  535. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/parsers/xpathparser.rb +656 -0
  536. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/quickpath.rb +265 -0
  537. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/rexml.rb +31 -0
  538. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/sax2listener.rb +97 -0
  539. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/security.rb +27 -0
  540. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/source.rb +296 -0
  541. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/streamlistener.rb +92 -0
  542. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/syncenumerator.rb +32 -0
  543. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/text.rb +425 -0
  544. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/undefinednamespaceexception.rb +8 -0
  545. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/relaxng.rb +538 -0
  546. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/validation.rb +143 -0
  547. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/validation/validationexception.rb +9 -0
  548. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xmldecl.rb +115 -0
  549. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xmltokens.rb +84 -0
  550. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xpath.rb +80 -0
  551. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rexml/xpath_parser.rb +703 -0
  552. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/rinda.rb +327 -0
  553. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/ring.rb +480 -0
  554. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rinda/tuplespace.rb +642 -0
  555. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper.rb +73 -0
  556. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/core.rb +70 -0
  557. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/filter.rb +77 -0
  558. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/lexer.rb +186 -0
  559. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ripper/sexp.rb +118 -0
  560. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss.rb +91 -0
  561. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/0.9.rb +461 -0
  562. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/1.0.rb +484 -0
  563. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/2.0.rb +142 -0
  564. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/atom.rb +839 -0
  565. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content.rb +33 -0
  566. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content/1.0.rb +9 -0
  567. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/content/2.0.rb +11 -0
  568. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/converter.rb +170 -0
  569. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore.rb +163 -0
  570. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/1.0.rb +12 -0
  571. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/2.0.rb +12 -0
  572. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/dublincore/atom.rb +16 -0
  573. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/image.rb +197 -0
  574. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/itunes.rb +412 -0
  575. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker.rb +78 -0
  576. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/0.9.rb +508 -0
  577. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/1.0.rb +435 -0
  578. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/2.0.rb +223 -0
  579. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/atom.rb +172 -0
  580. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/base.rb +944 -0
  581. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/content.rb +21 -0
  582. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/dublincore.rb +121 -0
  583. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/entry.rb +163 -0
  584. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/feed.rb +426 -0
  585. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/image.rb +111 -0
  586. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/itunes.rb +242 -0
  587. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/slash.rb +33 -0
  588. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/syndication.rb +18 -0
  589. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/taxonomy.rb +118 -0
  590. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/maker/trackback.rb +61 -0
  591. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/parser.rb +570 -0
  592. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/rexmlparser.rb +49 -0
  593. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/rss.rb +1352 -0
  594. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/slash.rb +51 -0
  595. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/syndication.rb +68 -0
  596. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/taxonomy.rb +147 -0
  597. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/trackback.rb +290 -0
  598. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/utils.rb +199 -0
  599. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xml-stylesheet.rb +105 -0
  600. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xml.rb +71 -0
  601. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xmlparser.rb +94 -0
  602. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rss/xmlscanner.rb +121 -0
  603. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems.rb +1245 -0
  604. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/available_set.rb +164 -0
  605. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/basic_specification.rb +290 -0
  606. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/command.rb +582 -0
  607. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/command_manager.rb +218 -0
  608. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/build_command.rb +60 -0
  609. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/cert_command.rb +276 -0
  610. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/check_command.rb +93 -0
  611. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/cleanup_command.rb +165 -0
  612. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/contents_command.rb +190 -0
  613. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/dependency_command.rb +207 -0
  614. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/environment_command.rb +158 -0
  615. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/fetch_command.rb +77 -0
  616. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/generate_index_command.rb +84 -0
  617. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/help_command.rb +384 -0
  618. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/install_command.rb +347 -0
  619. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/list_command.rb +40 -0
  620. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/lock_command.rb +110 -0
  621. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/mirror_command.rb +25 -0
  622. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/open_command.rb +74 -0
  623. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/outdated_command.rb +32 -0
  624. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/owner_command.rb +99 -0
  625. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/pristine_command.rb +165 -0
  626. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/push_command.rb +98 -0
  627. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/query_command.rb +343 -0
  628. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/rdoc_command.rb +96 -0
  629. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/search_command.rb +40 -0
  630. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/server_command.rb +86 -0
  631. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/setup_command.rb +483 -0
  632. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/sources_command.rb +210 -0
  633. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/specification_command.rb +145 -0
  634. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/stale_command.rb +38 -0
  635. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/uninstall_command.rb +164 -0
  636. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/unpack_command.rb +182 -0
  637. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/update_command.rb +277 -0
  638. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/which_command.rb +90 -0
  639. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/commands/yank_command.rb +107 -0
  640. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/compatibility.rb +59 -0
  641. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/config_file.rb +483 -0
  642. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb +73 -0
  643. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb +139 -0
  644. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/defaults.rb +177 -0
  645. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb +334 -0
  646. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency_installer.rb +480 -0
  647. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/dependency_list.rb +240 -0
  648. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/deprecate.rb +70 -0
  649. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/doctor.rb +131 -0
  650. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/errors.rb +137 -0
  651. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/exceptions.rb +270 -0
  652. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext.rb +18 -0
  653. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/build_error.rb +6 -0
  654. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/builder.rb +218 -0
  655. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/cmake_builder.rb +16 -0
  656. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/configure_builder.rb +23 -0
  657. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/ext_conf_builder.rb +78 -0
  658. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ext/rake_builder.rb +36 -0
  659. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb +81 -0
  660. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/gemcutter_utilities.rb +154 -0
  661. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/indexer.rb +498 -0
  662. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_default_message.rb +12 -0
  663. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_message.rb +12 -0
  664. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/install_update_options.rb +186 -0
  665. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/installer.rb +819 -0
  666. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/installer_test_case.rb +193 -0
  667. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/local_remote_options.rb +148 -0
  668. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/mock_gem_ui.rb +88 -0
  669. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/name_tuple.rb +123 -0
  670. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package.rb +613 -0
  671. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/digest_io.rb +64 -0
  672. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/file_source.rb +33 -0
  673. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/io_source.rb +45 -0
  674. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/old.rb +178 -0
  675. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/source.rb +3 -0
  676. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_header.rb +229 -0
  677. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_reader.rb +123 -0
  678. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_reader/entry.rb +147 -0
  679. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_test_case.rb +137 -0
  680. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package/tar_writer.rb +326 -0
  681. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/package_task.rb +128 -0
  682. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/path_support.rb +87 -0
  683. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/platform.rb +204 -0
  684. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/psych_additions.rb +9 -0
  685. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/psych_tree.rb +31 -0
  686. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/rdoc.rb +335 -0
  687. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/remote_fetcher.rb +398 -0
  688. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request.rb +244 -0
  689. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/connection_pools.rb +83 -0
  690. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/http_pool.rb +47 -0
  691. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request/https_pool.rb +10 -0
  692. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set.rb +413 -0
  693. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set/gem_dependency_api.rb +801 -0
  694. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/request_set/lockfile.rb +650 -0
  695. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/requirement.rb +273 -0
  696. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver.rb +485 -0
  697. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/activation_request.rb +172 -0
  698. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/api_set.rb +125 -0
  699. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/api_specification.rb +85 -0
  700. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/best_set.rb +78 -0
  701. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/composed_set.rb +66 -0
  702. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/conflict.rb +160 -0
  703. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/current_set.rb +13 -0
  704. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/dependency_request.rb +116 -0
  705. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/git_set.rb +122 -0
  706. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/git_specification.rb +59 -0
  707. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/index_set.rb +80 -0
  708. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/index_specification.rb +69 -0
  709. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/installed_specification.rb +58 -0
  710. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/installer_set.rb +224 -0
  711. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/local_specification.rb +41 -0
  712. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/lock_set.rb +84 -0
  713. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/lock_specification.rb +84 -0
  714. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/requirement_list.rb +81 -0
  715. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/set.rb +56 -0
  716. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/spec_specification.rb +56 -0
  717. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/specification.rb +110 -0
  718. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/stats.rb +44 -0
  719. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/vendor_set.rb +87 -0
  720. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/resolver/vendor_specification.rb +24 -0
  721. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security.rb +595 -0
  722. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/policies.rb +115 -0
  723. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/policy.rb +295 -0
  724. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/signer.rb +154 -0
  725. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/security/trust_dir.rb +118 -0
  726. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/server.rb +868 -0
  727. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source.rb +234 -0
  728. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/git.rb +240 -0
  729. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/installed.rb +40 -0
  730. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/local.rb +129 -0
  731. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/lock.rb +48 -0
  732. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/specific_file.rb +72 -0
  733. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source/vendor.rb +27 -0
  734. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_list.rb +149 -0
  735. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_local.rb +5 -0
  736. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/source_specific_file.rb +4 -0
  737. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/spec_fetcher.rb +269 -0
  738. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/specification.rb +2800 -0
  739. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
  740. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/AddTrustExternalCARoot.pem +32 -0
  741. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
  742. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
  743. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
  744. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/ssl_certs/GeoTrustGlobalCA.pem +20 -0
  745. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/stub_specification.rb +196 -0
  746. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/syck_hack.rb +76 -0
  747. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/test_case.rb +1430 -0
  748. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/test_utilities.rb +383 -0
  749. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/text.rb +75 -0
  750. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/uninstaller.rb +345 -0
  751. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/uri_formatter.rb +49 -0
  752. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/user_interaction.rb +711 -0
  753. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util.rb +134 -0
  754. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/list.rb +48 -0
  755. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb +34 -0
  756. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/validator.rb +165 -0
  757. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/version.rb +356 -0
  758. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/version_option.rb +71 -0
  759. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/scanf.rb +776 -0
  760. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/securerandom.rb +293 -0
  761. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/set.rb +787 -0
  762. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell.rb +458 -0
  763. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/builtin-command.rb +146 -0
  764. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/command-processor.rb +667 -0
  765. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/error.rb +25 -0
  766. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/filter.rb +137 -0
  767. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/process-controller.rb +310 -0
  768. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/system-command.rb +158 -0
  769. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shell/version.rb +15 -0
  770. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/shellwords.rb +215 -0
  771. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/singleton.rb +172 -0
  772. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/socket.rb +871 -0
  773. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/sync.rb +328 -0
  774. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/syslog/logger.rb +208 -0
  775. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb +367 -0
  776. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/thwait.rb +140 -0
  777. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/time.rb +676 -0
  778. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/timeout.rb +130 -0
  779. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tmpdir.rb +139 -0
  780. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tracer.rb +286 -0
  781. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/tsort.rb +450 -0
  782. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/ubygems.rb +10 -0
  783. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/un.rb +375 -0
  784. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize.rb +78 -0
  785. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize/normalize.rb +168 -0
  786. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/unicode_normalize/tables.rb +1163 -0
  787. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri.rb +111 -0
  788. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/common.rb +720 -0
  789. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ftp.rb +266 -0
  790. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/generic.rb +1557 -0
  791. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/http.rb +106 -0
  792. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/https.rb +22 -0
  793. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ldap.rb +260 -0
  794. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/ldaps.rb +20 -0
  795. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/mailto.rb +286 -0
  796. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/rfc2396_parser.rb +543 -0
  797. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/uri/rfc3986_parser.rb +124 -0
  798. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/weakref.rb +106 -0
  799. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick.rb +226 -0
  800. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/accesslog.rb +158 -0
  801. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/cgi.rb +308 -0
  802. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/compat.rb +35 -0
  803. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/config.rb +151 -0
  804. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/cookie.rb +171 -0
  805. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/htmlutils.rb +29 -0
  806. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth.rb +95 -0
  807. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/authenticator.rb +116 -0
  808. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/basicauth.rb +108 -0
  809. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/digestauth.rb +408 -0
  810. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htdigest.rb +131 -0
  811. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htgroup.rb +93 -0
  812. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/htpasswd.rb +124 -0
  813. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpauth/userdb.rb +52 -0
  814. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpproxy.rb +337 -0
  815. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httprequest.rb +584 -0
  816. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpresponse.rb +466 -0
  817. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/https.rb +86 -0
  818. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb +278 -0
  819. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet.rb +22 -0
  820. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/abstract.rb +153 -0
  821. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/cgi_runner.rb +46 -0
  822. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/cgihandler.rb +120 -0
  823. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/erbhandler.rb +87 -0
  824. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/filehandler.rb +521 -0
  825. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpservlet/prochandler.rb +46 -0
  826. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpstatus.rb +196 -0
  827. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httputils.rb +509 -0
  828. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/httpversion.rb +75 -0
  829. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/log.rb +155 -0
  830. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb +365 -0
  831. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/ssl.rb +196 -0
  832. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/utils.rb +230 -0
  833. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/webrick/version.rb +17 -0
  834. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc.rb +301 -0
  835. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/base64.rb +62 -0
  836. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/client.rb +614 -0
  837. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/config.rb +43 -0
  838. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/create.rb +286 -0
  839. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/datetime.rb +129 -0
  840. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/marshal.rb +66 -0
  841. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/parser.rb +870 -0
  842. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/server.rb +707 -0
  843. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/xmlrpc/utils.rb +171 -0
  844. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml.rb +59 -0
  845. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml/dbm.rb +279 -0
  846. data/bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/yaml/store.rb +81 -0
  847. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/charlock_holmes-0.7.3.info +1 -0
  848. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.4.info +1 -0
  849. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/eventmachine-1.0.6.info +1 -0
  850. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/puma-2.11.2.info +1 -0
  851. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/rugged-0.21.4.info +1 -0
  852. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/build_info/rugged-0.22.0b5.info +1 -0
  853. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundle +21 -0
  854. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundle_ruby +56 -0
  855. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bin/bundler +21 -0
  856. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/bundler.gemspec +32 -0
  857. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb +446 -0
  858. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/anonymizable_uri.rb +32 -0
  859. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/capistrano.rb +16 -0
  860. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli.rb +407 -0
  861. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/binstubs.rb +38 -0
  862. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/cache.rb +35 -0
  863. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/check.rb +35 -0
  864. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/clean.rb +26 -0
  865. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/common.rb +56 -0
  866. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/config.rb +84 -0
  867. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/console.rb +38 -0
  868. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/exec.rb +44 -0
  869. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/gem.rb +195 -0
  870. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/init.rb +33 -0
  871. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/inject.rb +33 -0
  872. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/install.rb +156 -0
  873. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/open.rb +23 -0
  874. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/outdated.rb +80 -0
  875. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/package.rb +45 -0
  876. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/platform.rb +43 -0
  877. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/show.rb +74 -0
  878. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/update.rb +73 -0
  879. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/cli/viz.rb +27 -0
  880. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/constants.rb +5 -0
  881. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/current_ruby.rb +183 -0
  882. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/definition.rb +628 -0
  883. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dep_proxy.rb +43 -0
  884. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dependency.rb +110 -0
  885. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/deployment.rb +59 -0
  886. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/deprecate.rb +15 -0
  887. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/dsl.rb +331 -0
  888. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/endpoint_specification.rb +76 -0
  889. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/env.rb +75 -0
  890. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/environment.rb +42 -0
  891. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/fetcher.rb +423 -0
  892. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/friendly_errors.rb +85 -0
  893. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_helper.rb +180 -0
  894. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_helpers.rb +26 -0
  895. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_installer.rb +9 -0
  896. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_path_manipulation.rb +8 -0
  897. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/gem_tasks.rb +2 -0
  898. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/graph.rb +169 -0
  899. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/index.rb +197 -0
  900. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/injector.rb +64 -0
  901. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/installer.rb +339 -0
  902. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/lazy_specification.rb +83 -0
  903. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/lockfile_parser.rb +167 -0
  904. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle +119 -0
  905. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-config +217 -0
  906. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-exec +159 -0
  907. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-install +345 -0
  908. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-package +52 -0
  909. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-platform +61 -0
  910. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/bundle-update +213 -0
  911. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/man/gemfile.5 +669 -0
  912. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/match_platform.rb +13 -0
  913. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/psyched_yaml.rb +26 -0
  914. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/remote_specification.rb +57 -0
  915. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/resolver.rb +334 -0
  916. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/retry.rb +60 -0
  917. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ruby_dsl.rb +11 -0
  918. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ruby_version.rb +117 -0
  919. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/rubygems_ext.rb +170 -0
  920. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/rubygems_integration.rb +619 -0
  921. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb +289 -0
  922. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/settings.rb +208 -0
  923. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/setup.rb +24 -0
  924. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/shared_helpers.rb +149 -0
  925. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/similarity_detector.rb +63 -0
  926. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source.rb +46 -0
  927. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/git.rb +294 -0
  928. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/git/git_proxy.rb +162 -0
  929. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path.rb +226 -0
  930. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/path/installer.rb +43 -0
  931. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source/rubygems.rb +381 -0
  932. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/source_list.rb +101 -0
  933. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/spec_set.rb +154 -0
  934. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/.document +1 -0
  935. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
  936. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem +32 -0
  937. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
  938. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
  939. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
  940. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem +20 -0
  941. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ssl_certs/certificate_manager.rb +65 -0
  942. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui.rb +7 -0
  943. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/rg_proxy.rb +21 -0
  944. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/shell.rb +103 -0
  945. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ui/silent.rb +44 -0
  946. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo.rb +5 -0
  947. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +266 -0
  948. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +69 -0
  949. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +3 -0
  950. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +90 -0
  951. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +63 -0
  952. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +415 -0
  953. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +43 -0
  954. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +43 -0
  955. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/net/http/faster.rb +26 -0
  956. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/net/http/persistent.rb +1230 -0
  957. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +128 -0
  958. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor.rb +484 -0
  959. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions.rb +319 -0
  960. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +103 -0
  961. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +59 -0
  962. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
  963. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
  964. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +316 -0
  965. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +107 -0
  966. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/base.rb +656 -0
  967. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/command.rb +133 -0
  968. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
  969. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +10 -0
  970. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +98 -0
  971. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
  972. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
  973. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
  974. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
  975. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
  976. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
  977. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
  978. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +73 -0
  979. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
  980. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/option.rb +125 -0
  981. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/parser/options.rb +218 -0
  982. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
  983. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/runner.rb +322 -0
  984. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
  985. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +421 -0
  986. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
  987. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
  988. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/util.rb +267 -0
  989. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
  990. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_molinillo.rb +2 -0
  991. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_persistent.rb +11 -0
  992. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vendored_thor.rb +3 -0
  993. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/version.rb +6 -0
  994. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/vlad.rb +11 -0
  995. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/worker.rb +73 -0
  996. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/bundler-1.9.9.gemspec +47 -0
  997. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/bigdecimal-1.2.6.gemspec +20 -0
  998. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/io-console-0.4.3.gemspec +23 -0
  999. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/json-1.8.1.gemspec +7 -0
  1000. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/psych-2.0.8.gemspec +25 -0
  1001. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rake-10.4.2.gemspec +7 -0
  1002. data/bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rdoc-4.2.0.gemspec +7 -0
  1003. data/bin/traveling-ruby-2.2.2/test +1 -0
  1004. data/bin/traveling-ruby-2.2.2/test-rake +1 -0
  1005. data/lib/rb2exe/version.rb +1 -1
  1006. data/rb2exe.gemspec +0 -1
  1007. metadata +1003 -16
  1008. data/.gitignore +0 -9
@@ -0,0 +1,191 @@
1
+ #--
2
+ # $Release Version: 0.5 $
3
+ # $Revision: 1.1.1.1.4.1 $
4
+
5
+ ##
6
+ # = mathn
7
+ #
8
+ # mathn serves to make mathematical operations more precise in Ruby
9
+ # and to integrate other mathematical standard libraries.
10
+ #
11
+ # Without mathn:
12
+ #
13
+ # 3 / 2 => 1 # Integer
14
+ #
15
+ # With mathn:
16
+ #
17
+ # 3 / 2 => 3/2 # Rational
18
+ #
19
+ # mathn keeps value in exact terms.
20
+ #
21
+ # Without mathn:
22
+ #
23
+ # 20 / 9 * 3 * 14 / 7 * 3 / 2 # => 18
24
+ #
25
+ # With mathn:
26
+ #
27
+ # 20 / 9 * 3 * 14 / 7 * 3 / 2 # => 20
28
+ #
29
+ #
30
+ # When you require 'mathn', the libraries for Prime, CMath, Matrix and Vector
31
+ # are also loaded.
32
+ #
33
+ # == Copyright
34
+ #
35
+ # Author: Keiju ISHITSUKA (SHL Japan Inc.)
36
+ #--
37
+ # class Numeric follows to make this documentation findable in a reasonable
38
+ # location
39
+
40
+ warn('lib/mathn.rb is deprecated') if $VERBOSE
41
+
42
+ class Numeric; end
43
+
44
+ require "cmath.rb"
45
+ require "matrix.rb"
46
+ require "prime.rb"
47
+
48
+ require "mathn/rational"
49
+ require "mathn/complex"
50
+
51
+ unless defined?(Math.exp!)
52
+ Object.instance_eval{remove_const :Math}
53
+ Math = CMath # :nodoc:
54
+ end
55
+
56
+ ##
57
+ # When mathn is required, Fixnum's division is enhanced to
58
+ # return more precise values from mathematical expressions.
59
+ #
60
+ # 2/3*3 # => 0
61
+ # require 'mathn'
62
+ # 2/3*3 # => 2
63
+
64
+ class Fixnum
65
+ remove_method :/
66
+
67
+ ##
68
+ # +/+ defines the Rational division for Fixnum.
69
+ #
70
+ # 1/3 # => (1/3)
71
+
72
+ alias / quo
73
+ end
74
+
75
+ ##
76
+ # When mathn is required Bignum's division is enhanced to
77
+ # return more precise values from mathematical expressions.
78
+ #
79
+ # (2**72) / ((2**70) * 3) # => 4/3
80
+
81
+ class Bignum
82
+ remove_method :/
83
+
84
+ ##
85
+ # +/+ defines the Rational division for Bignum.
86
+ #
87
+ # (2**72) / ((2**70) * 3) # => 4/3
88
+
89
+ alias / quo
90
+ end
91
+
92
+ ##
93
+ # When mathn is required, the Math module changes as follows:
94
+ #
95
+ # Standard Math module behaviour:
96
+ # Math.sqrt(4/9) # => 0.0
97
+ # Math.sqrt(4.0/9.0) # => 0.666666666666667
98
+ # Math.sqrt(- 4/9) # => Errno::EDOM: Numerical argument out of domain - sqrt
99
+ #
100
+ # After require 'mathn', this is changed to:
101
+ #
102
+ # require 'mathn'
103
+ # Math.sqrt(4/9) # => 2/3
104
+ # Math.sqrt(4.0/9.0) # => 0.666666666666667
105
+ # Math.sqrt(- 4/9) # => Complex(0, 2/3)
106
+
107
+ module Math
108
+ remove_method(:sqrt)
109
+
110
+ ##
111
+ # Computes the square root of +a+. It makes use of Complex and
112
+ # Rational to have no rounding errors if possible.
113
+ #
114
+ # Math.sqrt(4/9) # => 2/3
115
+ # Math.sqrt(- 4/9) # => Complex(0, 2/3)
116
+ # Math.sqrt(4.0/9.0) # => 0.666666666666667
117
+
118
+ def sqrt(a)
119
+ if a.kind_of?(Complex)
120
+ abs = sqrt(a.real*a.real + a.imag*a.imag)
121
+ x = sqrt((a.real + abs)/Rational(2))
122
+ y = sqrt((-a.real + abs)/Rational(2))
123
+ if a.imag >= 0
124
+ Complex(x, y)
125
+ else
126
+ Complex(x, -y)
127
+ end
128
+ elsif a.respond_to?(:nan?) and a.nan?
129
+ a
130
+ elsif a >= 0
131
+ rsqrt(a)
132
+ else
133
+ Complex(0,rsqrt(-a))
134
+ end
135
+ end
136
+
137
+ ##
138
+ # Compute square root of a non negative number. This method is
139
+ # internally used by +Math.sqrt+.
140
+
141
+ def rsqrt(a)
142
+ if a.kind_of?(Float)
143
+ sqrt!(a)
144
+ elsif a.kind_of?(Rational)
145
+ rsqrt(a.numerator)/rsqrt(a.denominator)
146
+ else
147
+ src = a
148
+ max = 2 ** 32
149
+ byte_a = [src & 0xffffffff]
150
+ # ruby's bug
151
+ while (src >= max) and (src >>= 32)
152
+ byte_a.unshift src & 0xffffffff
153
+ end
154
+
155
+ answer = 0
156
+ main = 0
157
+ side = 0
158
+ for elm in byte_a
159
+ main = (main << 32) + elm
160
+ side <<= 16
161
+ if answer != 0
162
+ if main * 4 < side * side
163
+ applo = main.div(side)
164
+ else
165
+ applo = ((sqrt!(side * side + 4 * main) - side)/2.0).to_i + 1
166
+ end
167
+ else
168
+ applo = sqrt!(main).to_i + 1
169
+ end
170
+
171
+ while (x = (side + applo) * applo) > main
172
+ applo -= 1
173
+ end
174
+ main -= x
175
+ answer = (answer << 16) + applo
176
+ side += applo * 2
177
+ end
178
+ if main == 0
179
+ answer
180
+ else
181
+ sqrt!(a)
182
+ end
183
+ end
184
+ end
185
+
186
+ class << self
187
+ remove_method(:sqrt)
188
+ end
189
+ module_function :sqrt
190
+ module_function :rsqrt
191
+ end
@@ -0,0 +1,2161 @@
1
+ # encoding: utf-8
2
+ #
3
+ # = matrix.rb
4
+ #
5
+ # An implementation of Matrix and Vector classes.
6
+ #
7
+ # See classes Matrix and Vector for documentation.
8
+ #
9
+ # Current Maintainer:: Marc-André Lafortune
10
+ # Original Author:: Keiju ISHITSUKA
11
+ # Original Documentation:: Gavin Sinclair (sourced from <i>Ruby in a Nutshell</i> (Matsumoto, O'Reilly))
12
+ ##
13
+
14
+ require "e2mmap.rb"
15
+
16
+ module ExceptionForMatrix # :nodoc:
17
+ extend Exception2MessageMapper
18
+ def_e2message(TypeError, "wrong argument type %s (expected %s)")
19
+ def_e2message(ArgumentError, "Wrong # of arguments(%d for %d)")
20
+
21
+ def_exception("ErrDimensionMismatch", "\#{self.name} dimension mismatch")
22
+ def_exception("ErrNotRegular", "Not Regular Matrix")
23
+ def_exception("ErrOperationNotDefined", "Operation(%s) can\\'t be defined: %s op %s")
24
+ def_exception("ErrOperationNotImplemented", "Sorry, Operation(%s) not implemented: %s op %s")
25
+ end
26
+
27
+ #
28
+ # The +Matrix+ class represents a mathematical matrix. It provides methods for creating
29
+ # matrices, operating on them arithmetically and algebraically,
30
+ # and determining their mathematical properties (trace, rank, inverse, determinant).
31
+ #
32
+ # == Method Catalogue
33
+ #
34
+ # To create a matrix:
35
+ # * Matrix[*rows]
36
+ # * Matrix.[](*rows)
37
+ # * Matrix.rows(rows, copy = true)
38
+ # * Matrix.columns(columns)
39
+ # * Matrix.build(row_count, column_count, &block)
40
+ # * Matrix.diagonal(*values)
41
+ # * Matrix.scalar(n, value)
42
+ # * Matrix.identity(n)
43
+ # * Matrix.unit(n)
44
+ # * Matrix.I(n)
45
+ # * Matrix.zero(n)
46
+ # * Matrix.row_vector(row)
47
+ # * Matrix.column_vector(column)
48
+ # * Matrix.hstack(*matrices)
49
+ # * Matrix.vstack(*matrices)
50
+ #
51
+ # To access Matrix elements/columns/rows/submatrices/properties:
52
+ # * #[](i, j)
53
+ # * #row_count (row_size)
54
+ # * #column_count (column_size)
55
+ # * #row(i)
56
+ # * #column(j)
57
+ # * #collect
58
+ # * #map
59
+ # * #each
60
+ # * #each_with_index
61
+ # * #find_index
62
+ # * #minor(*param)
63
+ # * #first_minor(row, column)
64
+ # * #cofactor(row, column)
65
+ # * #adjugate
66
+ # * #laplace_expansion(row_or_column: num)
67
+ # * #cofactor_expansion(row_or_column: num)
68
+ #
69
+ # Properties of a matrix:
70
+ # * #diagonal?
71
+ # * #empty?
72
+ # * #hermitian?
73
+ # * #lower_triangular?
74
+ # * #normal?
75
+ # * #orthogonal?
76
+ # * #permutation?
77
+ # * #real?
78
+ # * #regular?
79
+ # * #singular?
80
+ # * #square?
81
+ # * #symmetric?
82
+ # * #unitary?
83
+ # * #upper_triangular?
84
+ # * #zero?
85
+ #
86
+ # Matrix arithmetic:
87
+ # * #*(m)
88
+ # * #+(m)
89
+ # * #-(m)
90
+ # * #/(m)
91
+ # * #inverse
92
+ # * #inv
93
+ # * #**
94
+ # * #+@
95
+ # * #-@
96
+ #
97
+ # Matrix functions:
98
+ # * #determinant
99
+ # * #det
100
+ # * #hstack(*matrices)
101
+ # * #rank
102
+ # * #round
103
+ # * #trace
104
+ # * #tr
105
+ # * #transpose
106
+ # * #t
107
+ # * #vstack(*matrices)
108
+ #
109
+ # Matrix decompositions:
110
+ # * #eigen
111
+ # * #eigensystem
112
+ # * #lup
113
+ # * #lup_decomposition
114
+ #
115
+ # Complex arithmetic:
116
+ # * conj
117
+ # * conjugate
118
+ # * imag
119
+ # * imaginary
120
+ # * real
121
+ # * rect
122
+ # * rectangular
123
+ #
124
+ # Conversion to other data types:
125
+ # * #coerce(other)
126
+ # * #row_vectors
127
+ # * #column_vectors
128
+ # * #to_a
129
+ #
130
+ # String representations:
131
+ # * #to_s
132
+ # * #inspect
133
+ #
134
+ class Matrix
135
+ include Enumerable
136
+ include ExceptionForMatrix
137
+ autoload :EigenvalueDecomposition, "matrix/eigenvalue_decomposition"
138
+ autoload :LUPDecomposition, "matrix/lup_decomposition"
139
+
140
+ # instance creations
141
+ private_class_method :new
142
+ attr_reader :rows
143
+ protected :rows
144
+
145
+ #
146
+ # Creates a matrix where each argument is a row.
147
+ # Matrix[ [25, 93], [-1, 66] ]
148
+ # => 25 93
149
+ # -1 66
150
+ #
151
+ def Matrix.[](*rows)
152
+ rows(rows, false)
153
+ end
154
+
155
+ #
156
+ # Creates a matrix where +rows+ is an array of arrays, each of which is a row
157
+ # of the matrix. If the optional argument +copy+ is false, use the given
158
+ # arrays as the internal structure of the matrix without copying.
159
+ # Matrix.rows([[25, 93], [-1, 66]])
160
+ # => 25 93
161
+ # -1 66
162
+ #
163
+ def Matrix.rows(rows, copy = true)
164
+ rows = convert_to_array(rows, copy)
165
+ rows.map! do |row|
166
+ convert_to_array(row, copy)
167
+ end
168
+ size = (rows[0] || []).size
169
+ rows.each do |row|
170
+ raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size
171
+ end
172
+ new rows, size
173
+ end
174
+
175
+ #
176
+ # Creates a matrix using +columns+ as an array of column vectors.
177
+ # Matrix.columns([[25, 93], [-1, 66]])
178
+ # => 25 -1
179
+ # 93 66
180
+ #
181
+ def Matrix.columns(columns)
182
+ rows(columns, false).transpose
183
+ end
184
+
185
+ #
186
+ # Creates a matrix of size +row_count+ x +column_count+.
187
+ # It fills the values by calling the given block,
188
+ # passing the current row and column.
189
+ # Returns an enumerator if no block is given.
190
+ #
191
+ # m = Matrix.build(2, 4) {|row, col| col - row }
192
+ # => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
193
+ # m = Matrix.build(3) { rand }
194
+ # => a 3x3 matrix with random elements
195
+ #
196
+ def Matrix.build(row_count, column_count = row_count)
197
+ row_count = CoercionHelper.coerce_to_int(row_count)
198
+ column_count = CoercionHelper.coerce_to_int(column_count)
199
+ raise ArgumentError if row_count < 0 || column_count < 0
200
+ return to_enum :build, row_count, column_count unless block_given?
201
+ rows = Array.new(row_count) do |i|
202
+ Array.new(column_count) do |j|
203
+ yield i, j
204
+ end
205
+ end
206
+ new rows, column_count
207
+ end
208
+
209
+ #
210
+ # Creates a matrix where the diagonal elements are composed of +values+.
211
+ # Matrix.diagonal(9, 5, -3)
212
+ # => 9 0 0
213
+ # 0 5 0
214
+ # 0 0 -3
215
+ #
216
+ def Matrix.diagonal(*values)
217
+ size = values.size
218
+ return Matrix.empty if size == 0
219
+ rows = Array.new(size) {|j|
220
+ row = Array.new(size, 0)
221
+ row[j] = values[j]
222
+ row
223
+ }
224
+ new rows
225
+ end
226
+
227
+ #
228
+ # Creates an +n+ by +n+ diagonal matrix where each diagonal element is
229
+ # +value+.
230
+ # Matrix.scalar(2, 5)
231
+ # => 5 0
232
+ # 0 5
233
+ #
234
+ def Matrix.scalar(n, value)
235
+ diagonal(*Array.new(n, value))
236
+ end
237
+
238
+ #
239
+ # Creates an +n+ by +n+ identity matrix.
240
+ # Matrix.identity(2)
241
+ # => 1 0
242
+ # 0 1
243
+ #
244
+ def Matrix.identity(n)
245
+ scalar(n, 1)
246
+ end
247
+ class << Matrix
248
+ alias unit identity
249
+ alias I identity
250
+ end
251
+
252
+ #
253
+ # Creates a zero matrix.
254
+ # Matrix.zero(2)
255
+ # => 0 0
256
+ # 0 0
257
+ #
258
+ def Matrix.zero(row_count, column_count = row_count)
259
+ rows = Array.new(row_count){Array.new(column_count, 0)}
260
+ new rows, column_count
261
+ end
262
+
263
+ #
264
+ # Creates a single-row matrix where the values of that row are as given in
265
+ # +row+.
266
+ # Matrix.row_vector([4,5,6])
267
+ # => 4 5 6
268
+ #
269
+ def Matrix.row_vector(row)
270
+ row = convert_to_array(row)
271
+ new [row]
272
+ end
273
+
274
+ #
275
+ # Creates a single-column matrix where the values of that column are as given
276
+ # in +column+.
277
+ # Matrix.column_vector([4,5,6])
278
+ # => 4
279
+ # 5
280
+ # 6
281
+ #
282
+ def Matrix.column_vector(column)
283
+ column = convert_to_array(column)
284
+ new [column].transpose, 1
285
+ end
286
+
287
+ #
288
+ # Creates a empty matrix of +row_count+ x +column_count+.
289
+ # At least one of +row_count+ or +column_count+ must be 0.
290
+ #
291
+ # m = Matrix.empty(2, 0)
292
+ # m == Matrix[ [], [] ]
293
+ # => true
294
+ # n = Matrix.empty(0, 3)
295
+ # n == Matrix.columns([ [], [], [] ])
296
+ # => true
297
+ # m * n
298
+ # => Matrix[[0, 0, 0], [0, 0, 0]]
299
+ #
300
+ def Matrix.empty(row_count = 0, column_count = 0)
301
+ raise ArgumentError, "One size must be 0" if column_count != 0 && row_count != 0
302
+ raise ArgumentError, "Negative size" if column_count < 0 || row_count < 0
303
+
304
+ new([[]]*row_count, column_count)
305
+ end
306
+
307
+ #
308
+ # Create a matrix by stacking matrices vertically
309
+ #
310
+ # x = Matrix[[1, 2], [3, 4]]
311
+ # y = Matrix[[5, 6], [7, 8]]
312
+ # Matrix.vstack(x, y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
313
+ #
314
+ def Matrix.vstack(x, *matrices)
315
+ raise TypeError, "Expected a Matrix, got a #{x.class}" unless x.is_a?(Matrix)
316
+ result = x.send(:rows).map(&:dup)
317
+ matrices.each do |m|
318
+ raise TypeError, "Expected a Matrix, got a #{m.class}" unless m.is_a?(Matrix)
319
+ if m.column_count != x.column_count
320
+ raise ErrDimensionMismatch, "The given matrices must have #{x.column_count} columns, but one has #{m.column_count}"
321
+ end
322
+ result.concat(m.send(:rows))
323
+ end
324
+ new result, x.column_count
325
+ end
326
+
327
+
328
+ #
329
+ # Create a matrix by stacking matrices horizontally
330
+ #
331
+ # x = Matrix[[1, 2], [3, 4]]
332
+ # y = Matrix[[5, 6], [7, 8]]
333
+ # Matrix.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
334
+ #
335
+ def Matrix.hstack(x, *matrices)
336
+ raise TypeError, "Expected a Matrix, got a #{x.class}" unless x.is_a?(Matrix)
337
+ result = x.send(:rows).map(&:dup)
338
+ total_column_count = x.column_count
339
+ matrices.each do |m|
340
+ raise TypeError, "Expected a Matrix, got a #{m.class}" unless m.is_a?(Matrix)
341
+ if m.row_count != x.row_count
342
+ raise ErrDimensionMismatch, "The given matrices must have #{x.row_count} rows, but one has #{m.row_count}"
343
+ end
344
+ result.each_with_index do |row, i|
345
+ row.concat m.send(:rows)[i]
346
+ end
347
+ total_column_count += m.column_count
348
+ end
349
+ new result, total_column_count
350
+ end
351
+
352
+ #
353
+ # Matrix.new is private; use Matrix.rows, columns, [], etc... to create.
354
+ #
355
+ def initialize(rows, column_count = rows[0].size)
356
+ # No checking is done at this point. rows must be an Array of Arrays.
357
+ # column_count must be the size of the first row, if there is one,
358
+ # otherwise it *must* be specified and can be any integer >= 0
359
+ @rows = rows
360
+ @column_count = column_count
361
+ end
362
+
363
+ def new_matrix(rows, column_count = rows[0].size) # :nodoc:
364
+ self.class.send(:new, rows, column_count) # bypass privacy of Matrix.new
365
+ end
366
+ private :new_matrix
367
+
368
+ #
369
+ # Returns element (+i+,+j+) of the matrix. That is: row +i+, column +j+.
370
+ #
371
+ def [](i, j)
372
+ @rows.fetch(i){return nil}[j]
373
+ end
374
+ alias element []
375
+ alias component []
376
+
377
+ def []=(i, j, v)
378
+ @rows[i][j] = v
379
+ end
380
+ alias set_element []=
381
+ alias set_component []=
382
+ private :[]=, :set_element, :set_component
383
+
384
+ #
385
+ # Returns the number of rows.
386
+ #
387
+ def row_count
388
+ @rows.size
389
+ end
390
+
391
+ alias_method :row_size, :row_count
392
+ #
393
+ # Returns the number of columns.
394
+ #
395
+ attr_reader :column_count
396
+ alias_method :column_size, :column_count
397
+
398
+ #
399
+ # Returns row vector number +i+ of the matrix as a Vector (starting at 0 like
400
+ # an array). When a block is given, the elements of that vector are iterated.
401
+ #
402
+ def row(i, &block) # :yield: e
403
+ if block_given?
404
+ @rows.fetch(i){return self}.each(&block)
405
+ self
406
+ else
407
+ Vector.elements(@rows.fetch(i){return nil})
408
+ end
409
+ end
410
+
411
+ #
412
+ # Returns column vector number +j+ of the matrix as a Vector (starting at 0
413
+ # like an array). When a block is given, the elements of that vector are
414
+ # iterated.
415
+ #
416
+ def column(j) # :yield: e
417
+ if block_given?
418
+ return self if j >= column_count || j < -column_count
419
+ row_count.times do |i|
420
+ yield @rows[i][j]
421
+ end
422
+ self
423
+ else
424
+ return nil if j >= column_count || j < -column_count
425
+ col = Array.new(row_count) {|i|
426
+ @rows[i][j]
427
+ }
428
+ Vector.elements(col, false)
429
+ end
430
+ end
431
+
432
+ #
433
+ # Returns a matrix that is the result of iteration of the given block over all
434
+ # elements of the matrix.
435
+ # Matrix[ [1,2], [3,4] ].collect { |e| e**2 }
436
+ # => 1 4
437
+ # 9 16
438
+ #
439
+ def collect(&block) # :yield: e
440
+ return to_enum(:collect) unless block_given?
441
+ rows = @rows.collect{|row| row.collect(&block)}
442
+ new_matrix rows, column_count
443
+ end
444
+ alias map collect
445
+
446
+ #
447
+ # Yields all elements of the matrix, starting with those of the first row,
448
+ # or returns an Enumerator if no block given.
449
+ # Elements can be restricted by passing an argument:
450
+ # * :all (default): yields all elements
451
+ # * :diagonal: yields only elements on the diagonal
452
+ # * :off_diagonal: yields all elements except on the diagonal
453
+ # * :lower: yields only elements on or below the diagonal
454
+ # * :strict_lower: yields only elements below the diagonal
455
+ # * :strict_upper: yields only elements above the diagonal
456
+ # * :upper: yields only elements on or above the diagonal
457
+ #
458
+ # Matrix[ [1,2], [3,4] ].each { |e| puts e }
459
+ # # => prints the numbers 1 to 4
460
+ # Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
461
+ #
462
+ def each(which = :all) # :yield: e
463
+ return to_enum :each, which unless block_given?
464
+ last = column_count - 1
465
+ case which
466
+ when :all
467
+ block = Proc.new
468
+ @rows.each do |row|
469
+ row.each(&block)
470
+ end
471
+ when :diagonal
472
+ @rows.each_with_index do |row, row_index|
473
+ yield row.fetch(row_index){return self}
474
+ end
475
+ when :off_diagonal
476
+ @rows.each_with_index do |row, row_index|
477
+ column_count.times do |col_index|
478
+ yield row[col_index] unless row_index == col_index
479
+ end
480
+ end
481
+ when :lower
482
+ @rows.each_with_index do |row, row_index|
483
+ 0.upto([row_index, last].min) do |col_index|
484
+ yield row[col_index]
485
+ end
486
+ end
487
+ when :strict_lower
488
+ @rows.each_with_index do |row, row_index|
489
+ [row_index, column_count].min.times do |col_index|
490
+ yield row[col_index]
491
+ end
492
+ end
493
+ when :strict_upper
494
+ @rows.each_with_index do |row, row_index|
495
+ (row_index+1).upto(last) do |col_index|
496
+ yield row[col_index]
497
+ end
498
+ end
499
+ when :upper
500
+ @rows.each_with_index do |row, row_index|
501
+ row_index.upto(last) do |col_index|
502
+ yield row[col_index]
503
+ end
504
+ end
505
+ else
506
+ raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
507
+ end
508
+ self
509
+ end
510
+
511
+ #
512
+ # Same as #each, but the row index and column index in addition to the element
513
+ #
514
+ # Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
515
+ # puts "#{e} at #{row}, #{col}"
516
+ # end
517
+ # # => Prints:
518
+ # # 1 at 0, 0
519
+ # # 2 at 0, 1
520
+ # # 3 at 1, 0
521
+ # # 4 at 1, 1
522
+ #
523
+ def each_with_index(which = :all) # :yield: e, row, column
524
+ return to_enum :each_with_index, which unless block_given?
525
+ last = column_count - 1
526
+ case which
527
+ when :all
528
+ @rows.each_with_index do |row, row_index|
529
+ row.each_with_index do |e, col_index|
530
+ yield e, row_index, col_index
531
+ end
532
+ end
533
+ when :diagonal
534
+ @rows.each_with_index do |row, row_index|
535
+ yield row.fetch(row_index){return self}, row_index, row_index
536
+ end
537
+ when :off_diagonal
538
+ @rows.each_with_index do |row, row_index|
539
+ column_count.times do |col_index|
540
+ yield row[col_index], row_index, col_index unless row_index == col_index
541
+ end
542
+ end
543
+ when :lower
544
+ @rows.each_with_index do |row, row_index|
545
+ 0.upto([row_index, last].min) do |col_index|
546
+ yield row[col_index], row_index, col_index
547
+ end
548
+ end
549
+ when :strict_lower
550
+ @rows.each_with_index do |row, row_index|
551
+ [row_index, column_count].min.times do |col_index|
552
+ yield row[col_index], row_index, col_index
553
+ end
554
+ end
555
+ when :strict_upper
556
+ @rows.each_with_index do |row, row_index|
557
+ (row_index+1).upto(last) do |col_index|
558
+ yield row[col_index], row_index, col_index
559
+ end
560
+ end
561
+ when :upper
562
+ @rows.each_with_index do |row, row_index|
563
+ row_index.upto(last) do |col_index|
564
+ yield row[col_index], row_index, col_index
565
+ end
566
+ end
567
+ else
568
+ raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
569
+ end
570
+ self
571
+ end
572
+
573
+ SELECTORS = {all: true, diagonal: true, off_diagonal: true, lower: true, strict_lower: true, strict_upper: true, upper: true}.freeze
574
+ #
575
+ # :call-seq:
576
+ # index(value, selector = :all) -> [row, column]
577
+ # index(selector = :all){ block } -> [row, column]
578
+ # index(selector = :all) -> an_enumerator
579
+ #
580
+ # The index method is specialized to return the index as [row, column]
581
+ # It also accepts an optional +selector+ argument, see #each for details.
582
+ #
583
+ # Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
584
+ # Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
585
+ #
586
+ def index(*args)
587
+ raise ArgumentError, "wrong number of arguments(#{args.size} for 0-2)" if args.size > 2
588
+ which = (args.size == 2 || SELECTORS.include?(args.last)) ? args.pop : :all
589
+ return to_enum :find_index, which, *args unless block_given? || args.size == 1
590
+ if args.size == 1
591
+ value = args.first
592
+ each_with_index(which) do |e, row_index, col_index|
593
+ return row_index, col_index if e == value
594
+ end
595
+ else
596
+ each_with_index(which) do |e, row_index, col_index|
597
+ return row_index, col_index if yield e
598
+ end
599
+ end
600
+ nil
601
+ end
602
+ alias_method :find_index, :index
603
+
604
+ #
605
+ # Returns a section of the matrix. The parameters are either:
606
+ # * start_row, nrows, start_col, ncols; OR
607
+ # * row_range, col_range
608
+ #
609
+ # Matrix.diagonal(9, 5, -3).minor(0..1, 0..2)
610
+ # => 9 0 0
611
+ # 0 5 0
612
+ #
613
+ # Like Array#[], negative indices count backward from the end of the
614
+ # row or column (-1 is the last element). Returns nil if the starting
615
+ # row or column is greater than row_count or column_count respectively.
616
+ #
617
+ def minor(*param)
618
+ case param.size
619
+ when 2
620
+ row_range, col_range = param
621
+ from_row = row_range.first
622
+ from_row += row_count if from_row < 0
623
+ to_row = row_range.end
624
+ to_row += row_count if to_row < 0
625
+ to_row += 1 unless row_range.exclude_end?
626
+ size_row = to_row - from_row
627
+
628
+ from_col = col_range.first
629
+ from_col += column_count if from_col < 0
630
+ to_col = col_range.end
631
+ to_col += column_count if to_col < 0
632
+ to_col += 1 unless col_range.exclude_end?
633
+ size_col = to_col - from_col
634
+ when 4
635
+ from_row, size_row, from_col, size_col = param
636
+ return nil if size_row < 0 || size_col < 0
637
+ from_row += row_count if from_row < 0
638
+ from_col += column_count if from_col < 0
639
+ else
640
+ raise ArgumentError, param.inspect
641
+ end
642
+
643
+ return nil if from_row > row_count || from_col > column_count || from_row < 0 || from_col < 0
644
+ rows = @rows[from_row, size_row].collect{|row|
645
+ row[from_col, size_col]
646
+ }
647
+ new_matrix rows, [column_count - from_col, size_col].min
648
+ end
649
+
650
+ #
651
+ # Returns the submatrix obtained by deleting the specified row and column.
652
+ #
653
+ # Matrix.diagonal(9, 5, -3, 4).first_minor(1, 2)
654
+ # => 9 0 0
655
+ # 0 0 0
656
+ # 0 0 4
657
+ #
658
+ def first_minor(row, column)
659
+ raise RuntimeError, "first_minor of empty matrix is not defined" if empty?
660
+
661
+ unless 0 <= row && row < row_count
662
+ raise ArgumentError, "invalid row (#{row.inspect} for 0..#{row_count - 1})"
663
+ end
664
+
665
+ unless 0 <= column && column < column_count
666
+ raise ArgumentError, "invalid column (#{column.inspect} for 0..#{column_count - 1})"
667
+ end
668
+
669
+ arrays = to_a
670
+ arrays.delete_at(row)
671
+ arrays.each do |array|
672
+ array.delete_at(column)
673
+ end
674
+
675
+ new_matrix arrays, column_count - 1
676
+ end
677
+
678
+ #
679
+ # Returns the (row, column) cofactor which is obtained by multiplying
680
+ # the first minor by (-1)**(row + column).
681
+ #
682
+ # Matrix.diagonal(9, 5, -3, 4).cofactor(1, 1)
683
+ # => -108
684
+ #
685
+ def cofactor(row, column)
686
+ raise RuntimeError, "cofactor of empty matrix is not defined" if empty?
687
+ Matrix.Raise ErrDimensionMismatch unless square?
688
+
689
+ det_of_minor = first_minor(row, column).determinant
690
+ det_of_minor * (-1) ** (row + column)
691
+ end
692
+
693
+ #
694
+ # Returns the adjugate of the matrix.
695
+ #
696
+ # Matrix[ [7,6],[3,9] ].adjugate
697
+ # => 9 -6
698
+ # -3 7
699
+ #
700
+ def adjugate
701
+ Matrix.Raise ErrDimensionMismatch unless square?
702
+ Matrix.build(row_count, column_count) do |row, column|
703
+ cofactor(column, row)
704
+ end
705
+ end
706
+
707
+ #
708
+ # Returns the Laplace expansion along given row or column.
709
+ #
710
+ # Matrix[[7,6], [3,9]].laplace_expansion(column: 1)
711
+ # => 45
712
+ #
713
+ # Matrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0)
714
+ # => Vector[3, -2]
715
+ #
716
+ #
717
+ def laplace_expansion(row: nil, column: nil)
718
+ num = row || column
719
+
720
+ if !num || (row && column)
721
+ raise ArgumentError, "exactly one the row or column arguments must be specified"
722
+ end
723
+
724
+ Matrix.Raise ErrDimensionMismatch unless square?
725
+ raise RuntimeError, "laplace_expansion of empty matrix is not defined" if empty?
726
+
727
+ unless 0 <= num && num < row_count
728
+ raise ArgumentError, "invalid num (#{num.inspect} for 0..#{row_count - 1})"
729
+ end
730
+
731
+ send(row ? :row : :column, num).map.with_index { |e, k|
732
+ e * cofactor(*(row ? [num, k] : [k,num]))
733
+ }.inject(:+)
734
+ end
735
+ alias_method :cofactor_expansion, :laplace_expansion
736
+
737
+
738
+ #--
739
+ # TESTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
740
+ #++
741
+
742
+ #
743
+ # Returns +true+ if this is a diagonal matrix.
744
+ # Raises an error if matrix is not square.
745
+ #
746
+ def diagonal?
747
+ Matrix.Raise ErrDimensionMismatch unless square?
748
+ each(:off_diagonal).all?(&:zero?)
749
+ end
750
+
751
+ #
752
+ # Returns +true+ if this is an empty matrix, i.e. if the number of rows
753
+ # or the number of columns is 0.
754
+ #
755
+ def empty?
756
+ column_count == 0 || row_count == 0
757
+ end
758
+
759
+ #
760
+ # Returns +true+ if this is an hermitian matrix.
761
+ # Raises an error if matrix is not square.
762
+ #
763
+ def hermitian?
764
+ Matrix.Raise ErrDimensionMismatch unless square?
765
+ each_with_index(:upper).all? do |e, row, col|
766
+ e == rows[col][row].conj
767
+ end
768
+ end
769
+
770
+ #
771
+ # Returns +true+ if this is a lower triangular matrix.
772
+ #
773
+ def lower_triangular?
774
+ each(:strict_upper).all?(&:zero?)
775
+ end
776
+
777
+ #
778
+ # Returns +true+ if this is a normal matrix.
779
+ # Raises an error if matrix is not square.
780
+ #
781
+ def normal?
782
+ Matrix.Raise ErrDimensionMismatch unless square?
783
+ rows.each_with_index do |row_i, i|
784
+ rows.each_with_index do |row_j, j|
785
+ s = 0
786
+ rows.each_with_index do |row_k, k|
787
+ s += row_i[k] * row_j[k].conj - row_k[i].conj * row_k[j]
788
+ end
789
+ return false unless s == 0
790
+ end
791
+ end
792
+ true
793
+ end
794
+
795
+ #
796
+ # Returns +true+ if this is an orthogonal matrix
797
+ # Raises an error if matrix is not square.
798
+ #
799
+ def orthogonal?
800
+ Matrix.Raise ErrDimensionMismatch unless square?
801
+ rows.each_with_index do |row, i|
802
+ column_count.times do |j|
803
+ s = 0
804
+ row_count.times do |k|
805
+ s += row[k] * rows[k][j]
806
+ end
807
+ return false unless s == (i == j ? 1 : 0)
808
+ end
809
+ end
810
+ true
811
+ end
812
+
813
+ #
814
+ # Returns +true+ if this is a permutation matrix
815
+ # Raises an error if matrix is not square.
816
+ #
817
+ def permutation?
818
+ Matrix.Raise ErrDimensionMismatch unless square?
819
+ cols = Array.new(column_count)
820
+ rows.each_with_index do |row, i|
821
+ found = false
822
+ row.each_with_index do |e, j|
823
+ if e == 1
824
+ return false if found || cols[j]
825
+ found = cols[j] = true
826
+ elsif e != 0
827
+ return false
828
+ end
829
+ end
830
+ return false unless found
831
+ end
832
+ true
833
+ end
834
+
835
+ #
836
+ # Returns +true+ if all entries of the matrix are real.
837
+ #
838
+ def real?
839
+ all?(&:real?)
840
+ end
841
+
842
+ #
843
+ # Returns +true+ if this is a regular (i.e. non-singular) matrix.
844
+ #
845
+ def regular?
846
+ not singular?
847
+ end
848
+
849
+ #
850
+ # Returns +true+ if this is a singular matrix.
851
+ #
852
+ def singular?
853
+ determinant == 0
854
+ end
855
+
856
+ #
857
+ # Returns +true+ if this is a square matrix.
858
+ #
859
+ def square?
860
+ column_count == row_count
861
+ end
862
+
863
+ #
864
+ # Returns +true+ if this is a symmetric matrix.
865
+ # Raises an error if matrix is not square.
866
+ #
867
+ def symmetric?
868
+ Matrix.Raise ErrDimensionMismatch unless square?
869
+ each_with_index(:strict_upper) do |e, row, col|
870
+ return false if e != rows[col][row]
871
+ end
872
+ true
873
+ end
874
+
875
+ #
876
+ # Returns +true+ if this is a unitary matrix
877
+ # Raises an error if matrix is not square.
878
+ #
879
+ def unitary?
880
+ Matrix.Raise ErrDimensionMismatch unless square?
881
+ rows.each_with_index do |row, i|
882
+ column_count.times do |j|
883
+ s = 0
884
+ row_count.times do |k|
885
+ s += row[k].conj * rows[k][j]
886
+ end
887
+ return false unless s == (i == j ? 1 : 0)
888
+ end
889
+ end
890
+ true
891
+ end
892
+
893
+ #
894
+ # Returns +true+ if this is an upper triangular matrix.
895
+ #
896
+ def upper_triangular?
897
+ each(:strict_lower).all?(&:zero?)
898
+ end
899
+
900
+ #
901
+ # Returns +true+ if this is a matrix with only zero elements
902
+ #
903
+ def zero?
904
+ all?(&:zero?)
905
+ end
906
+
907
+ #--
908
+ # OBJECT METHODS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
909
+ #++
910
+
911
+ #
912
+ # Returns +true+ if and only if the two matrices contain equal elements.
913
+ #
914
+ def ==(other)
915
+ return false unless Matrix === other &&
916
+ column_count == other.column_count # necessary for empty matrices
917
+ rows == other.rows
918
+ end
919
+
920
+ def eql?(other)
921
+ return false unless Matrix === other &&
922
+ column_count == other.column_count # necessary for empty matrices
923
+ rows.eql? other.rows
924
+ end
925
+
926
+ #
927
+ # Returns a clone of the matrix, so that the contents of each do not reference
928
+ # identical objects.
929
+ # There should be no good reason to do this since Matrices are immutable.
930
+ #
931
+ def clone
932
+ new_matrix @rows.map(&:dup), column_count
933
+ end
934
+
935
+ #
936
+ # Returns a hash-code for the matrix.
937
+ #
938
+ def hash
939
+ @rows.hash
940
+ end
941
+
942
+ #--
943
+ # ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
944
+ #++
945
+
946
+ #
947
+ # Matrix multiplication.
948
+ # Matrix[[2,4], [6,8]] * Matrix.identity(2)
949
+ # => 2 4
950
+ # 6 8
951
+ #
952
+ def *(m) # m is matrix or vector or number
953
+ case(m)
954
+ when Numeric
955
+ rows = @rows.collect {|row|
956
+ row.collect {|e| e * m }
957
+ }
958
+ return new_matrix rows, column_count
959
+ when Vector
960
+ m = self.class.column_vector(m)
961
+ r = self * m
962
+ return r.column(0)
963
+ when Matrix
964
+ Matrix.Raise ErrDimensionMismatch if column_count != m.row_count
965
+
966
+ rows = Array.new(row_count) {|i|
967
+ Array.new(m.column_count) {|j|
968
+ (0 ... column_count).inject(0) do |vij, k|
969
+ vij + self[i, k] * m[k, j]
970
+ end
971
+ }
972
+ }
973
+ return new_matrix rows, m.column_count
974
+ else
975
+ return apply_through_coercion(m, __method__)
976
+ end
977
+ end
978
+
979
+ #
980
+ # Matrix addition.
981
+ # Matrix.scalar(2,5) + Matrix[[1,0], [-4,7]]
982
+ # => 6 0
983
+ # -4 12
984
+ #
985
+ def +(m)
986
+ case m
987
+ when Numeric
988
+ Matrix.Raise ErrOperationNotDefined, "+", self.class, m.class
989
+ when Vector
990
+ m = self.class.column_vector(m)
991
+ when Matrix
992
+ else
993
+ return apply_through_coercion(m, __method__)
994
+ end
995
+
996
+ Matrix.Raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count
997
+
998
+ rows = Array.new(row_count) {|i|
999
+ Array.new(column_count) {|j|
1000
+ self[i, j] + m[i, j]
1001
+ }
1002
+ }
1003
+ new_matrix rows, column_count
1004
+ end
1005
+
1006
+ #
1007
+ # Matrix subtraction.
1008
+ # Matrix[[1,5], [4,2]] - Matrix[[9,3], [-4,1]]
1009
+ # => -8 2
1010
+ # 8 1
1011
+ #
1012
+ def -(m)
1013
+ case m
1014
+ when Numeric
1015
+ Matrix.Raise ErrOperationNotDefined, "-", self.class, m.class
1016
+ when Vector
1017
+ m = self.class.column_vector(m)
1018
+ when Matrix
1019
+ else
1020
+ return apply_through_coercion(m, __method__)
1021
+ end
1022
+
1023
+ Matrix.Raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count
1024
+
1025
+ rows = Array.new(row_count) {|i|
1026
+ Array.new(column_count) {|j|
1027
+ self[i, j] - m[i, j]
1028
+ }
1029
+ }
1030
+ new_matrix rows, column_count
1031
+ end
1032
+
1033
+ #
1034
+ # Matrix division (multiplication by the inverse).
1035
+ # Matrix[[7,6], [3,9]] / Matrix[[2,9], [3,1]]
1036
+ # => -7 1
1037
+ # -3 -6
1038
+ #
1039
+ def /(other)
1040
+ case other
1041
+ when Numeric
1042
+ rows = @rows.collect {|row|
1043
+ row.collect {|e| e / other }
1044
+ }
1045
+ return new_matrix rows, column_count
1046
+ when Matrix
1047
+ return self * other.inverse
1048
+ else
1049
+ return apply_through_coercion(other, __method__)
1050
+ end
1051
+ end
1052
+
1053
+ #
1054
+ # Returns the inverse of the matrix.
1055
+ # Matrix[[-1, -1], [0, -1]].inverse
1056
+ # => -1 1
1057
+ # 0 -1
1058
+ #
1059
+ def inverse
1060
+ Matrix.Raise ErrDimensionMismatch unless square?
1061
+ self.class.I(row_count).send(:inverse_from, self)
1062
+ end
1063
+ alias inv inverse
1064
+
1065
+ def inverse_from(src) # :nodoc:
1066
+ last = row_count - 1
1067
+ a = src.to_a
1068
+
1069
+ 0.upto(last) do |k|
1070
+ i = k
1071
+ akk = a[k][k].abs
1072
+ (k+1).upto(last) do |j|
1073
+ v = a[j][k].abs
1074
+ if v > akk
1075
+ i = j
1076
+ akk = v
1077
+ end
1078
+ end
1079
+ Matrix.Raise ErrNotRegular if akk == 0
1080
+ if i != k
1081
+ a[i], a[k] = a[k], a[i]
1082
+ @rows[i], @rows[k] = @rows[k], @rows[i]
1083
+ end
1084
+ akk = a[k][k]
1085
+
1086
+ 0.upto(last) do |ii|
1087
+ next if ii == k
1088
+ q = a[ii][k].quo(akk)
1089
+ a[ii][k] = 0
1090
+
1091
+ (k + 1).upto(last) do |j|
1092
+ a[ii][j] -= a[k][j] * q
1093
+ end
1094
+ 0.upto(last) do |j|
1095
+ @rows[ii][j] -= @rows[k][j] * q
1096
+ end
1097
+ end
1098
+
1099
+ (k+1).upto(last) do |j|
1100
+ a[k][j] = a[k][j].quo(akk)
1101
+ end
1102
+ 0.upto(last) do |j|
1103
+ @rows[k][j] = @rows[k][j].quo(akk)
1104
+ end
1105
+ end
1106
+ self
1107
+ end
1108
+ private :inverse_from
1109
+
1110
+ #
1111
+ # Matrix exponentiation.
1112
+ # Equivalent to multiplying the matrix by itself N times.
1113
+ # Non integer exponents will be handled by diagonalizing the matrix.
1114
+ #
1115
+ # Matrix[[7,6], [3,9]] ** 2
1116
+ # => 67 96
1117
+ # 48 99
1118
+ #
1119
+ def ** (other)
1120
+ case other
1121
+ when Integer
1122
+ x = self
1123
+ if other <= 0
1124
+ x = self.inverse
1125
+ return self.class.identity(self.column_count) if other == 0
1126
+ other = -other
1127
+ end
1128
+ z = nil
1129
+ loop do
1130
+ z = z ? z * x : x if other[0] == 1
1131
+ return z if (other >>= 1).zero?
1132
+ x *= x
1133
+ end
1134
+ when Numeric
1135
+ v, d, v_inv = eigensystem
1136
+ v * self.class.diagonal(*d.each(:diagonal).map{|e| e ** other}) * v_inv
1137
+ else
1138
+ Matrix.Raise ErrOperationNotDefined, "**", self.class, other.class
1139
+ end
1140
+ end
1141
+
1142
+ def +@
1143
+ self
1144
+ end
1145
+
1146
+ def -@
1147
+ collect {|e| -e }
1148
+ end
1149
+
1150
+ #--
1151
+ # MATRIX FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1152
+ #++
1153
+
1154
+ #
1155
+ # Returns the determinant of the matrix.
1156
+ #
1157
+ # Beware that using Float values can yield erroneous results
1158
+ # because of their lack of precision.
1159
+ # Consider using exact types like Rational or BigDecimal instead.
1160
+ #
1161
+ # Matrix[[7,6], [3,9]].determinant
1162
+ # => 45
1163
+ #
1164
+ def determinant
1165
+ Matrix.Raise ErrDimensionMismatch unless square?
1166
+ m = @rows
1167
+ case row_count
1168
+ # Up to 4x4, give result using Laplacian expansion by minors.
1169
+ # This will typically be faster, as well as giving good results
1170
+ # in case of Floats
1171
+ when 0
1172
+ +1
1173
+ when 1
1174
+ + m[0][0]
1175
+ when 2
1176
+ + m[0][0] * m[1][1] - m[0][1] * m[1][0]
1177
+ when 3
1178
+ m0, m1, m2 = m
1179
+ + m0[0] * m1[1] * m2[2] - m0[0] * m1[2] * m2[1] \
1180
+ - m0[1] * m1[0] * m2[2] + m0[1] * m1[2] * m2[0] \
1181
+ + m0[2] * m1[0] * m2[1] - m0[2] * m1[1] * m2[0]
1182
+ when 4
1183
+ m0, m1, m2, m3 = m
1184
+ + m0[0] * m1[1] * m2[2] * m3[3] - m0[0] * m1[1] * m2[3] * m3[2] \
1185
+ - m0[0] * m1[2] * m2[1] * m3[3] + m0[0] * m1[2] * m2[3] * m3[1] \
1186
+ + m0[0] * m1[3] * m2[1] * m3[2] - m0[0] * m1[3] * m2[2] * m3[1] \
1187
+ - m0[1] * m1[0] * m2[2] * m3[3] + m0[1] * m1[0] * m2[3] * m3[2] \
1188
+ + m0[1] * m1[2] * m2[0] * m3[3] - m0[1] * m1[2] * m2[3] * m3[0] \
1189
+ - m0[1] * m1[3] * m2[0] * m3[2] + m0[1] * m1[3] * m2[2] * m3[0] \
1190
+ + m0[2] * m1[0] * m2[1] * m3[3] - m0[2] * m1[0] * m2[3] * m3[1] \
1191
+ - m0[2] * m1[1] * m2[0] * m3[3] + m0[2] * m1[1] * m2[3] * m3[0] \
1192
+ + m0[2] * m1[3] * m2[0] * m3[1] - m0[2] * m1[3] * m2[1] * m3[0] \
1193
+ - m0[3] * m1[0] * m2[1] * m3[2] + m0[3] * m1[0] * m2[2] * m3[1] \
1194
+ + m0[3] * m1[1] * m2[0] * m3[2] - m0[3] * m1[1] * m2[2] * m3[0] \
1195
+ - m0[3] * m1[2] * m2[0] * m3[1] + m0[3] * m1[2] * m2[1] * m3[0]
1196
+ else
1197
+ # For bigger matrices, use an efficient and general algorithm.
1198
+ # Currently, we use the Gauss-Bareiss algorithm
1199
+ determinant_bareiss
1200
+ end
1201
+ end
1202
+ alias_method :det, :determinant
1203
+
1204
+ #
1205
+ # Private. Use Matrix#determinant
1206
+ #
1207
+ # Returns the determinant of the matrix, using
1208
+ # Bareiss' multistep integer-preserving gaussian elimination.
1209
+ # It has the same computational cost order O(n^3) as standard Gaussian elimination.
1210
+ # Intermediate results are fraction free and of lower complexity.
1211
+ # A matrix of Integers will have thus intermediate results that are also Integers,
1212
+ # with smaller bignums (if any), while a matrix of Float will usually have
1213
+ # intermediate results with better precision.
1214
+ #
1215
+ def determinant_bareiss
1216
+ size = row_count
1217
+ last = size - 1
1218
+ a = to_a
1219
+ no_pivot = Proc.new{ return 0 }
1220
+ sign = +1
1221
+ pivot = 1
1222
+ size.times do |k|
1223
+ previous_pivot = pivot
1224
+ if (pivot = a[k][k]) == 0
1225
+ switch = (k+1 ... size).find(no_pivot) {|row|
1226
+ a[row][k] != 0
1227
+ }
1228
+ a[switch], a[k] = a[k], a[switch]
1229
+ pivot = a[k][k]
1230
+ sign = -sign
1231
+ end
1232
+ (k+1).upto(last) do |i|
1233
+ ai = a[i]
1234
+ (k+1).upto(last) do |j|
1235
+ ai[j] = (pivot * ai[j] - ai[k] * a[k][j]) / previous_pivot
1236
+ end
1237
+ end
1238
+ end
1239
+ sign * pivot
1240
+ end
1241
+ private :determinant_bareiss
1242
+
1243
+ #
1244
+ # deprecated; use Matrix#determinant
1245
+ #
1246
+ def determinant_e
1247
+ warn "#{caller(1)[0]}: warning: Matrix#determinant_e is deprecated; use #determinant"
1248
+ determinant
1249
+ end
1250
+ alias det_e determinant_e
1251
+
1252
+ #
1253
+ # Returns a new matrix resulting by stacking horizontally
1254
+ # the receiver with the given matrices
1255
+ #
1256
+ # x = Matrix[[1, 2], [3, 4]]
1257
+ # y = Matrix[[5, 6], [7, 8]]
1258
+ # x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
1259
+ #
1260
+ def hstack(*matrices)
1261
+ self.class.hstack(self, *matrices)
1262
+ end
1263
+
1264
+ #
1265
+ # Returns the rank of the matrix.
1266
+ # Beware that using Float values can yield erroneous results
1267
+ # because of their lack of precision.
1268
+ # Consider using exact types like Rational or BigDecimal instead.
1269
+ #
1270
+ # Matrix[[7,6], [3,9]].rank
1271
+ # => 2
1272
+ #
1273
+ def rank
1274
+ # We currently use Bareiss' multistep integer-preserving gaussian elimination
1275
+ # (see comments on determinant)
1276
+ a = to_a
1277
+ last_column = column_count - 1
1278
+ last_row = row_count - 1
1279
+ pivot_row = 0
1280
+ previous_pivot = 1
1281
+ 0.upto(last_column) do |k|
1282
+ switch_row = (pivot_row .. last_row).find {|row|
1283
+ a[row][k] != 0
1284
+ }
1285
+ if switch_row
1286
+ a[switch_row], a[pivot_row] = a[pivot_row], a[switch_row] unless pivot_row == switch_row
1287
+ pivot = a[pivot_row][k]
1288
+ (pivot_row+1).upto(last_row) do |i|
1289
+ ai = a[i]
1290
+ (k+1).upto(last_column) do |j|
1291
+ ai[j] = (pivot * ai[j] - ai[k] * a[pivot_row][j]) / previous_pivot
1292
+ end
1293
+ end
1294
+ pivot_row += 1
1295
+ previous_pivot = pivot
1296
+ end
1297
+ end
1298
+ pivot_row
1299
+ end
1300
+
1301
+ #
1302
+ # deprecated; use Matrix#rank
1303
+ #
1304
+ def rank_e
1305
+ warn "#{caller(1)[0]}: warning: Matrix#rank_e is deprecated; use #rank"
1306
+ rank
1307
+ end
1308
+
1309
+ # Returns a matrix with entries rounded to the given precision
1310
+ # (see Float#round)
1311
+ #
1312
+ def round(ndigits=0)
1313
+ map{|e| e.round(ndigits)}
1314
+ end
1315
+
1316
+ #
1317
+ # Returns the trace (sum of diagonal elements) of the matrix.
1318
+ # Matrix[[7,6], [3,9]].trace
1319
+ # => 16
1320
+ #
1321
+ def trace
1322
+ Matrix.Raise ErrDimensionMismatch unless square?
1323
+ (0...column_count).inject(0) do |tr, i|
1324
+ tr + @rows[i][i]
1325
+ end
1326
+ end
1327
+ alias tr trace
1328
+
1329
+ #
1330
+ # Returns the transpose of the matrix.
1331
+ # Matrix[[1,2], [3,4], [5,6]]
1332
+ # => 1 2
1333
+ # 3 4
1334
+ # 5 6
1335
+ # Matrix[[1,2], [3,4], [5,6]].transpose
1336
+ # => 1 3 5
1337
+ # 2 4 6
1338
+ #
1339
+ def transpose
1340
+ return self.class.empty(column_count, 0) if row_count.zero?
1341
+ new_matrix @rows.transpose, row_count
1342
+ end
1343
+ alias t transpose
1344
+
1345
+ #
1346
+ # Returns a new matrix resulting by stacking vertically
1347
+ # the receiver with the given matrices
1348
+ #
1349
+ # x = Matrix[[1, 2], [3, 4]]
1350
+ # y = Matrix[[5, 6], [7, 8]]
1351
+ # x.vstack(y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
1352
+ #
1353
+ def vstack(*matrices)
1354
+ self.class.vstack(self, *matrices)
1355
+ end
1356
+
1357
+ #--
1358
+ # DECOMPOSITIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1359
+ #++
1360
+
1361
+ #
1362
+ # Returns the Eigensystem of the matrix; see +EigenvalueDecomposition+.
1363
+ # m = Matrix[[1, 2], [3, 4]]
1364
+ # v, d, v_inv = m.eigensystem
1365
+ # d.diagonal? # => true
1366
+ # v.inv == v_inv # => true
1367
+ # (v * d * v_inv).round(5) == m # => true
1368
+ #
1369
+ def eigensystem
1370
+ EigenvalueDecomposition.new(self)
1371
+ end
1372
+ alias eigen eigensystem
1373
+
1374
+ #
1375
+ # Returns the LUP decomposition of the matrix; see +LUPDecomposition+.
1376
+ # a = Matrix[[1, 2], [3, 4]]
1377
+ # l, u, p = a.lup
1378
+ # l.lower_triangular? # => true
1379
+ # u.upper_triangular? # => true
1380
+ # p.permutation? # => true
1381
+ # l * u == p * a # => true
1382
+ # a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
1383
+ #
1384
+ def lup
1385
+ LUPDecomposition.new(self)
1386
+ end
1387
+ alias lup_decomposition lup
1388
+
1389
+ #--
1390
+ # COMPLEX ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1391
+ #++
1392
+
1393
+ #
1394
+ # Returns the conjugate of the matrix.
1395
+ # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
1396
+ # => 1+2i i 0
1397
+ # 1 2 3
1398
+ # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].conjugate
1399
+ # => 1-2i -i 0
1400
+ # 1 2 3
1401
+ #
1402
+ def conjugate
1403
+ collect(&:conjugate)
1404
+ end
1405
+ alias conj conjugate
1406
+
1407
+ #
1408
+ # Returns the imaginary part of the matrix.
1409
+ # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
1410
+ # => 1+2i i 0
1411
+ # 1 2 3
1412
+ # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].imaginary
1413
+ # => 2i i 0
1414
+ # 0 0 0
1415
+ #
1416
+ def imaginary
1417
+ collect(&:imaginary)
1418
+ end
1419
+ alias imag imaginary
1420
+
1421
+ #
1422
+ # Returns the real part of the matrix.
1423
+ # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
1424
+ # => 1+2i i 0
1425
+ # 1 2 3
1426
+ # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].real
1427
+ # => 1 0 0
1428
+ # 1 2 3
1429
+ #
1430
+ def real
1431
+ collect(&:real)
1432
+ end
1433
+
1434
+ #
1435
+ # Returns an array containing matrices corresponding to the real and imaginary
1436
+ # parts of the matrix
1437
+ #
1438
+ # m.rect == [m.real, m.imag] # ==> true for all matrices m
1439
+ #
1440
+ def rect
1441
+ [real, imag]
1442
+ end
1443
+ alias rectangular rect
1444
+
1445
+ #--
1446
+ # CONVERTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1447
+ #++
1448
+
1449
+ #
1450
+ # The coerce method provides support for Ruby type coercion.
1451
+ # This coercion mechanism is used by Ruby to handle mixed-type
1452
+ # numeric operations: it is intended to find a compatible common
1453
+ # type between the two operands of the operator.
1454
+ # See also Numeric#coerce.
1455
+ #
1456
+ def coerce(other)
1457
+ case other
1458
+ when Numeric
1459
+ return Scalar.new(other), self
1460
+ else
1461
+ raise TypeError, "#{self.class} can't be coerced into #{other.class}"
1462
+ end
1463
+ end
1464
+
1465
+ #
1466
+ # Returns an array of the row vectors of the matrix. See Vector.
1467
+ #
1468
+ def row_vectors
1469
+ Array.new(row_count) {|i|
1470
+ row(i)
1471
+ }
1472
+ end
1473
+
1474
+ #
1475
+ # Returns an array of the column vectors of the matrix. See Vector.
1476
+ #
1477
+ def column_vectors
1478
+ Array.new(column_count) {|i|
1479
+ column(i)
1480
+ }
1481
+ end
1482
+
1483
+ #
1484
+ # Returns an array of arrays that describe the rows of the matrix.
1485
+ #
1486
+ def to_a
1487
+ @rows.collect(&:dup)
1488
+ end
1489
+
1490
+ def elements_to_f
1491
+ warn "#{caller(1)[0]}: warning: Matrix#elements_to_f is deprecated, use map(&:to_f)"
1492
+ map(&:to_f)
1493
+ end
1494
+
1495
+ def elements_to_i
1496
+ warn "#{caller(1)[0]}: warning: Matrix#elements_to_i is deprecated, use map(&:to_i)"
1497
+ map(&:to_i)
1498
+ end
1499
+
1500
+ def elements_to_r
1501
+ warn "#{caller(1)[0]}: warning: Matrix#elements_to_r is deprecated, use map(&:to_r)"
1502
+ map(&:to_r)
1503
+ end
1504
+
1505
+ #--
1506
+ # PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1507
+ #++
1508
+
1509
+ #
1510
+ # Overrides Object#to_s
1511
+ #
1512
+ def to_s
1513
+ if empty?
1514
+ "#{self.class}.empty(#{row_count}, #{column_count})"
1515
+ else
1516
+ "#{self.class}[" + @rows.collect{|row|
1517
+ "[" + row.collect{|e| e.to_s}.join(", ") + "]"
1518
+ }.join(", ")+"]"
1519
+ end
1520
+ end
1521
+
1522
+ #
1523
+ # Overrides Object#inspect
1524
+ #
1525
+ def inspect
1526
+ if empty?
1527
+ "#{self.class}.empty(#{row_count}, #{column_count})"
1528
+ else
1529
+ "#{self.class}#{@rows.inspect}"
1530
+ end
1531
+ end
1532
+
1533
+ # Private helper modules
1534
+
1535
+ module ConversionHelper # :nodoc:
1536
+ #
1537
+ # Converts the obj to an Array. If copy is set to true
1538
+ # a copy of obj will be made if necessary.
1539
+ #
1540
+ def convert_to_array(obj, copy = false) # :nodoc:
1541
+ case obj
1542
+ when Array
1543
+ copy ? obj.dup : obj
1544
+ when Vector
1545
+ obj.to_a
1546
+ else
1547
+ begin
1548
+ converted = obj.to_ary
1549
+ rescue Exception => e
1550
+ raise TypeError, "can't convert #{obj.class} into an Array (#{e.message})"
1551
+ end
1552
+ raise TypeError, "#{obj.class}#to_ary should return an Array" unless converted.is_a? Array
1553
+ converted
1554
+ end
1555
+ end
1556
+ private :convert_to_array
1557
+ end
1558
+
1559
+ extend ConversionHelper
1560
+
1561
+ module CoercionHelper # :nodoc:
1562
+ #
1563
+ # Applies the operator +oper+ with argument +obj+
1564
+ # through coercion of +obj+
1565
+ #
1566
+ def apply_through_coercion(obj, oper)
1567
+ coercion = obj.coerce(self)
1568
+ raise TypeError unless coercion.is_a?(Array) && coercion.length == 2
1569
+ coercion[0].public_send(oper, coercion[1])
1570
+ rescue
1571
+ raise TypeError, "#{obj.inspect} can't be coerced into #{self.class}"
1572
+ end
1573
+ private :apply_through_coercion
1574
+
1575
+ #
1576
+ # Helper method to coerce a value into a specific class.
1577
+ # Raises a TypeError if the coercion fails or the returned value
1578
+ # is not of the right class.
1579
+ # (from Rubinius)
1580
+ #
1581
+ def self.coerce_to(obj, cls, meth) # :nodoc:
1582
+ return obj if obj.kind_of?(cls)
1583
+
1584
+ begin
1585
+ ret = obj.__send__(meth)
1586
+ rescue Exception => e
1587
+ raise TypeError, "Coercion error: #{obj.inspect}.#{meth} => #{cls} failed:\n" \
1588
+ "(#{e.message})"
1589
+ end
1590
+ raise TypeError, "Coercion error: obj.#{meth} did NOT return a #{cls} (was #{ret.class})" unless ret.kind_of? cls
1591
+ ret
1592
+ end
1593
+
1594
+ def self.coerce_to_int(obj)
1595
+ coerce_to(obj, Integer, :to_int)
1596
+ end
1597
+ end
1598
+
1599
+ include CoercionHelper
1600
+
1601
+ # Private CLASS
1602
+
1603
+ class Scalar < Numeric # :nodoc:
1604
+ include ExceptionForMatrix
1605
+ include CoercionHelper
1606
+
1607
+ def initialize(value)
1608
+ @value = value
1609
+ end
1610
+
1611
+ # ARITHMETIC
1612
+ def +(other)
1613
+ case other
1614
+ when Numeric
1615
+ Scalar.new(@value + other)
1616
+ when Vector, Matrix
1617
+ Scalar.Raise ErrOperationNotDefined, "+", @value.class, other.class
1618
+ else
1619
+ apply_through_coercion(other, __method__)
1620
+ end
1621
+ end
1622
+
1623
+ def -(other)
1624
+ case other
1625
+ when Numeric
1626
+ Scalar.new(@value - other)
1627
+ when Vector, Matrix
1628
+ Scalar.Raise ErrOperationNotDefined, "-", @value.class, other.class
1629
+ else
1630
+ apply_through_coercion(other, __method__)
1631
+ end
1632
+ end
1633
+
1634
+ def *(other)
1635
+ case other
1636
+ when Numeric
1637
+ Scalar.new(@value * other)
1638
+ when Vector, Matrix
1639
+ other.collect{|e| @value * e}
1640
+ else
1641
+ apply_through_coercion(other, __method__)
1642
+ end
1643
+ end
1644
+
1645
+ def / (other)
1646
+ case other
1647
+ when Numeric
1648
+ Scalar.new(@value / other)
1649
+ when Vector
1650
+ Scalar.Raise ErrOperationNotDefined, "/", @value.class, other.class
1651
+ when Matrix
1652
+ self * other.inverse
1653
+ else
1654
+ apply_through_coercion(other, __method__)
1655
+ end
1656
+ end
1657
+
1658
+ def ** (other)
1659
+ case other
1660
+ when Numeric
1661
+ Scalar.new(@value ** other)
1662
+ when Vector
1663
+ Scalar.Raise ErrOperationNotDefined, "**", @value.class, other.class
1664
+ when Matrix
1665
+ #other.powered_by(self)
1666
+ Scalar.Raise ErrOperationNotImplemented, "**", @value.class, other.class
1667
+ else
1668
+ apply_through_coercion(other, __method__)
1669
+ end
1670
+ end
1671
+ end
1672
+
1673
+ end
1674
+
1675
+
1676
+ #
1677
+ # The +Vector+ class represents a mathematical vector, which is useful in its own right, and
1678
+ # also constitutes a row or column of a Matrix.
1679
+ #
1680
+ # == Method Catalogue
1681
+ #
1682
+ # To create a Vector:
1683
+ # * Vector.[](*array)
1684
+ # * Vector.elements(array, copy = true)
1685
+ # * Vector.basis(size: n, index: k)
1686
+ #
1687
+ # To access elements:
1688
+ # * #[](i)
1689
+ #
1690
+ # To enumerate the elements:
1691
+ # * #each2(v)
1692
+ # * #collect2(v)
1693
+ #
1694
+ # Properties of vectors:
1695
+ # * #angle_with(v)
1696
+ # * Vector.independent?(*vs)
1697
+ # * #independent?(*vs)
1698
+ #
1699
+ # Vector arithmetic:
1700
+ # * #*(x) "is matrix or number"
1701
+ # * #+(v)
1702
+ # * #-(v)
1703
+ # * #+@
1704
+ # * #-@
1705
+ #
1706
+ # Vector functions:
1707
+ # * #inner_product(v), dot(v)
1708
+ # * #cross_product(v), cross(v)
1709
+ # * #collect
1710
+ # * #magnitude
1711
+ # * #map
1712
+ # * #map2(v)
1713
+ # * #norm
1714
+ # * #normalize
1715
+ # * #r
1716
+ # * #size
1717
+ #
1718
+ # Conversion to other data types:
1719
+ # * #covector
1720
+ # * #to_a
1721
+ # * #coerce(other)
1722
+ #
1723
+ # String representations:
1724
+ # * #to_s
1725
+ # * #inspect
1726
+ #
1727
+ class Vector
1728
+ include ExceptionForMatrix
1729
+ include Enumerable
1730
+ include Matrix::CoercionHelper
1731
+ extend Matrix::ConversionHelper
1732
+ #INSTANCE CREATION
1733
+
1734
+ private_class_method :new
1735
+ attr_reader :elements
1736
+ protected :elements
1737
+
1738
+ #
1739
+ # Creates a Vector from a list of elements.
1740
+ # Vector[7, 4, ...]
1741
+ #
1742
+ def Vector.[](*array)
1743
+ new convert_to_array(array, false)
1744
+ end
1745
+
1746
+ #
1747
+ # Creates a vector from an Array. The optional second argument specifies
1748
+ # whether the array itself or a copy is used internally.
1749
+ #
1750
+ def Vector.elements(array, copy = true)
1751
+ new convert_to_array(array, copy)
1752
+ end
1753
+
1754
+ #
1755
+ # Returns a standard basis +n+-vector, where k is the index.
1756
+ #
1757
+ # Vector.basis(size:, index:) # => Vector[0, 1, 0]
1758
+ #
1759
+ def Vector.basis(size:, index:)
1760
+ raise ArgumentError, "invalid size (#{size} for 1..)" if size < 1
1761
+ raise ArgumentError, "invalid index (#{index} for 0...#{size})" unless 0 <= index && index < size
1762
+ array = Array.new(size, 0)
1763
+ array[index] = 1
1764
+ new convert_to_array(array, false)
1765
+ end
1766
+
1767
+ #
1768
+ # Vector.new is private; use Vector[] or Vector.elements to create.
1769
+ #
1770
+ def initialize(array)
1771
+ # No checking is done at this point.
1772
+ @elements = array
1773
+ end
1774
+
1775
+ # ACCESSING
1776
+
1777
+ #
1778
+ # Returns element number +i+ (starting at zero) of the vector.
1779
+ #
1780
+ def [](i)
1781
+ @elements[i]
1782
+ end
1783
+ alias element []
1784
+ alias component []
1785
+
1786
+ def []=(i, v)
1787
+ @elements[i]= v
1788
+ end
1789
+ alias set_element []=
1790
+ alias set_component []=
1791
+ private :[]=, :set_element, :set_component
1792
+
1793
+ #
1794
+ # Returns the number of elements in the vector.
1795
+ #
1796
+ def size
1797
+ @elements.size
1798
+ end
1799
+
1800
+ #--
1801
+ # ENUMERATIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1802
+ #++
1803
+
1804
+ #
1805
+ # Iterate over the elements of this vector
1806
+ #
1807
+ def each(&block)
1808
+ return to_enum(:each) unless block_given?
1809
+ @elements.each(&block)
1810
+ self
1811
+ end
1812
+
1813
+ #
1814
+ # Iterate over the elements of this vector and +v+ in conjunction.
1815
+ #
1816
+ def each2(v) # :yield: e1, e2
1817
+ raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer)
1818
+ Vector.Raise ErrDimensionMismatch if size != v.size
1819
+ return to_enum(:each2, v) unless block_given?
1820
+ size.times do |i|
1821
+ yield @elements[i], v[i]
1822
+ end
1823
+ self
1824
+ end
1825
+
1826
+ #
1827
+ # Collects (as in Enumerable#collect) over the elements of this vector and +v+
1828
+ # in conjunction.
1829
+ #
1830
+ def collect2(v) # :yield: e1, e2
1831
+ raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer)
1832
+ Vector.Raise ErrDimensionMismatch if size != v.size
1833
+ return to_enum(:collect2, v) unless block_given?
1834
+ Array.new(size) do |i|
1835
+ yield @elements[i], v[i]
1836
+ end
1837
+ end
1838
+
1839
+ #--
1840
+ # PROPERTIES -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1841
+ #++
1842
+
1843
+ #
1844
+ # Returns +true+ iff all of vectors are linearly independent.
1845
+ #
1846
+ # Vector.independent?(Vector[1,0], Vector[0,1])
1847
+ # => true
1848
+ #
1849
+ # Vector.independent?(Vector[1,2], Vector[2,4])
1850
+ # => false
1851
+ #
1852
+ def Vector.independent?(*vs)
1853
+ vs.each do |v|
1854
+ raise TypeError, "expected Vector, got #{v.class}" unless v.is_a?(Vector)
1855
+ Vector.Raise ErrDimensionMismatch unless v.size == vs.first.size
1856
+ end
1857
+ return false if vs.count > vs.first.size
1858
+ Matrix[*vs].rank.eql?(vs.count)
1859
+ end
1860
+
1861
+ #
1862
+ # Returns +true+ iff all of vectors are linearly independent.
1863
+ #
1864
+ # Vector[1,0].independent?(Vector[0,1])
1865
+ # => true
1866
+ #
1867
+ # Vector[1,2].independent?(Vector[2,4])
1868
+ # => false
1869
+ #
1870
+ def independent?(*vs)
1871
+ self.class.independent?(self, *vs)
1872
+ end
1873
+
1874
+ #--
1875
+ # COMPARING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1876
+ #++
1877
+
1878
+ #
1879
+ # Returns +true+ iff the two vectors have the same elements in the same order.
1880
+ #
1881
+ def ==(other)
1882
+ return false unless Vector === other
1883
+ @elements == other.elements
1884
+ end
1885
+
1886
+ def eql?(other)
1887
+ return false unless Vector === other
1888
+ @elements.eql? other.elements
1889
+ end
1890
+
1891
+ #
1892
+ # Returns a copy of the vector.
1893
+ #
1894
+ def clone
1895
+ self.class.elements(@elements)
1896
+ end
1897
+
1898
+ #
1899
+ # Returns a hash-code for the vector.
1900
+ #
1901
+ def hash
1902
+ @elements.hash
1903
+ end
1904
+
1905
+ #--
1906
+ # ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1907
+ #++
1908
+
1909
+ #
1910
+ # Multiplies the vector by +x+, where +x+ is a number or another vector.
1911
+ #
1912
+ def *(x)
1913
+ case x
1914
+ when Numeric
1915
+ els = @elements.collect{|e| e * x}
1916
+ self.class.elements(els, false)
1917
+ when Matrix
1918
+ Matrix.column_vector(self) * x
1919
+ when Vector
1920
+ Vector.Raise ErrOperationNotDefined, "*", self.class, x.class
1921
+ else
1922
+ apply_through_coercion(x, __method__)
1923
+ end
1924
+ end
1925
+
1926
+ #
1927
+ # Vector addition.
1928
+ #
1929
+ def +(v)
1930
+ case v
1931
+ when Vector
1932
+ Vector.Raise ErrDimensionMismatch if size != v.size
1933
+ els = collect2(v) {|v1, v2|
1934
+ v1 + v2
1935
+ }
1936
+ self.class.elements(els, false)
1937
+ when Matrix
1938
+ Matrix.column_vector(self) + v
1939
+ else
1940
+ apply_through_coercion(v, __method__)
1941
+ end
1942
+ end
1943
+
1944
+ #
1945
+ # Vector subtraction.
1946
+ #
1947
+ def -(v)
1948
+ case v
1949
+ when Vector
1950
+ Vector.Raise ErrDimensionMismatch if size != v.size
1951
+ els = collect2(v) {|v1, v2|
1952
+ v1 - v2
1953
+ }
1954
+ self.class.elements(els, false)
1955
+ when Matrix
1956
+ Matrix.column_vector(self) - v
1957
+ else
1958
+ apply_through_coercion(v, __method__)
1959
+ end
1960
+ end
1961
+
1962
+ #
1963
+ # Vector division.
1964
+ #
1965
+ def /(x)
1966
+ case x
1967
+ when Numeric
1968
+ els = @elements.collect{|e| e / x}
1969
+ self.class.elements(els, false)
1970
+ when Matrix, Vector
1971
+ Vector.Raise ErrOperationNotDefined, "/", self.class, x.class
1972
+ else
1973
+ apply_through_coercion(x, __method__)
1974
+ end
1975
+ end
1976
+
1977
+ def +@
1978
+ self
1979
+ end
1980
+
1981
+ def -@
1982
+ collect {|e| -e }
1983
+ end
1984
+
1985
+ #--
1986
+ # VECTOR FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1987
+ #++
1988
+
1989
+ #
1990
+ # Returns the inner product of this vector with the other.
1991
+ # Vector[4,7].inner_product Vector[10,1] => 47
1992
+ #
1993
+ def inner_product(v)
1994
+ Vector.Raise ErrDimensionMismatch if size != v.size
1995
+
1996
+ p = 0
1997
+ each2(v) {|v1, v2|
1998
+ p += v1 * v2.conj
1999
+ }
2000
+ p
2001
+ end
2002
+ alias_method :dot, :inner_product
2003
+
2004
+ #
2005
+ # Returns the cross product of this vector with the others.
2006
+ # Vector[1, 0, 0].cross_product Vector[0, 1, 0] => Vector[0, 0, 1]
2007
+ #
2008
+ # It is generalized to other dimensions to return a vector perpendicular
2009
+ # to the arguments.
2010
+ # Vector[1, 2].cross_product # => Vector[-2, 1]
2011
+ # Vector[1, 0, 0, 0].cross_product(
2012
+ # Vector[0, 1, 0, 0],
2013
+ # Vector[0, 0, 1, 0]
2014
+ # ) #=> Vector[0, 0, 0, 1]
2015
+ #
2016
+ def cross_product(*vs)
2017
+ raise ErrOperationNotDefined, "cross product is not defined on vectors of dimension #{size}" unless size >= 2
2018
+ raise ArgumentError, "wrong number of arguments (#{vs.size} for #{size - 2})" unless vs.size == size - 2
2019
+ vs.each do |v|
2020
+ raise TypeError, "expected Vector, got #{v.class}" unless v.is_a? Vector
2021
+ Vector.Raise ErrDimensionMismatch unless v.size == size
2022
+ end
2023
+ case size
2024
+ when 2
2025
+ Vector[-@elements[1], @elements[0]]
2026
+ when 3
2027
+ v = vs[0]
2028
+ Vector[ v[2]*@elements[1] - v[1]*@elements[2],
2029
+ v[0]*@elements[2] - v[2]*@elements[0],
2030
+ v[1]*@elements[0] - v[0]*@elements[1] ]
2031
+ else
2032
+ rows = self, *vs, Array.new(size) {|i| Vector.basis(size: size, index: i) }
2033
+ Matrix.rows(rows).laplace_expansion(row: size - 1)
2034
+ end
2035
+ end
2036
+ alias_method :cross, :cross_product
2037
+
2038
+ #
2039
+ # Like Array#collect.
2040
+ #
2041
+ def collect(&block) # :yield: e
2042
+ return to_enum(:collect) unless block_given?
2043
+ els = @elements.collect(&block)
2044
+ self.class.elements(els, false)
2045
+ end
2046
+ alias map collect
2047
+
2048
+ #
2049
+ # Returns the modulus (Pythagorean distance) of the vector.
2050
+ # Vector[5,8,2].r => 9.643650761
2051
+ #
2052
+ def magnitude
2053
+ Math.sqrt(@elements.inject(0) {|v, e| v + e.abs2})
2054
+ end
2055
+ alias r magnitude
2056
+ alias norm magnitude
2057
+
2058
+ #
2059
+ # Like Vector#collect2, but returns a Vector instead of an Array.
2060
+ #
2061
+ def map2(v, &block) # :yield: e1, e2
2062
+ return to_enum(:map2, v) unless block_given?
2063
+ els = collect2(v, &block)
2064
+ self.class.elements(els, false)
2065
+ end
2066
+
2067
+ class ZeroVectorError < StandardError
2068
+ end
2069
+ #
2070
+ # Returns a new vector with the same direction but with norm 1.
2071
+ # v = Vector[5,8,2].normalize
2072
+ # # => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505]
2073
+ # v.norm => 1.0
2074
+ #
2075
+ def normalize
2076
+ n = magnitude
2077
+ raise ZeroVectorError, "Zero vectors can not be normalized" if n == 0
2078
+ self / n
2079
+ end
2080
+
2081
+ #
2082
+ # Returns an angle with another vector. Result is within the [0...Math::PI].
2083
+ # Vector[1,0].angle_with(Vector[0,1])
2084
+ # # => Math::PI / 2
2085
+ #
2086
+ def angle_with(v)
2087
+ raise TypeError, "Expected a Vector, got a #{v.class}" unless v.is_a?(Vector)
2088
+ Vector.Raise ErrDimensionMismatch if size != v.size
2089
+ prod = magnitude * v.magnitude
2090
+ raise ZeroVectorError, "Can't get angle of zero vector" if prod == 0
2091
+
2092
+ Math.acos( inner_product(v) / prod )
2093
+ end
2094
+
2095
+ #--
2096
+ # CONVERTING
2097
+ #++
2098
+
2099
+ #
2100
+ # Creates a single-row matrix from this vector.
2101
+ #
2102
+ def covector
2103
+ Matrix.row_vector(self)
2104
+ end
2105
+
2106
+ #
2107
+ # Returns the elements of the vector in an array.
2108
+ #
2109
+ def to_a
2110
+ @elements.dup
2111
+ end
2112
+
2113
+ def elements_to_f
2114
+ warn "#{caller(1)[0]}: warning: Vector#elements_to_f is deprecated"
2115
+ map(&:to_f)
2116
+ end
2117
+
2118
+ def elements_to_i
2119
+ warn "#{caller(1)[0]}: warning: Vector#elements_to_i is deprecated"
2120
+ map(&:to_i)
2121
+ end
2122
+
2123
+ def elements_to_r
2124
+ warn "#{caller(1)[0]}: warning: Vector#elements_to_r is deprecated"
2125
+ map(&:to_r)
2126
+ end
2127
+
2128
+ #
2129
+ # The coerce method provides support for Ruby type coercion.
2130
+ # This coercion mechanism is used by Ruby to handle mixed-type
2131
+ # numeric operations: it is intended to find a compatible common
2132
+ # type between the two operands of the operator.
2133
+ # See also Numeric#coerce.
2134
+ #
2135
+ def coerce(other)
2136
+ case other
2137
+ when Numeric
2138
+ return Matrix::Scalar.new(other), self
2139
+ else
2140
+ raise TypeError, "#{self.class} can't be coerced into #{other.class}"
2141
+ end
2142
+ end
2143
+
2144
+ #--
2145
+ # PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2146
+ #++
2147
+
2148
+ #
2149
+ # Overrides Object#to_s
2150
+ #
2151
+ def to_s
2152
+ "Vector[" + @elements.join(", ") + "]"
2153
+ end
2154
+
2155
+ #
2156
+ # Overrides Object#inspect
2157
+ #
2158
+ def inspect
2159
+ "Vector" + @elements.inspect
2160
+ end
2161
+ end