X-Git-Url: http://git.euphorik.ch/?p=pompage.git;a=blobdiff_plain;f=src%2Ftest.rb;fp=src%2Ftest.rb;h=3a68b87b5c06120fa3c04fcb7ed1d3aa93b985f3;hp=dcc633c5ca3e5db9590f927d9f9402566d084c38;hb=339621e8669fbd4b09e2d0825f5521469503837b;hpb=3c0d34648b6522fcd86baa485bf6008ba805f7a3 diff --git a/src/test.rb b/src/test.rb index dcc633c..3a68b87 100644 --- a/src/test.rb +++ b/src/test.rb @@ -1,18 +1,3 @@ # coding: utf-8 -# doc : http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html -Net::HTTP.version_1_2 - -# hack : http://arosien.blogspot.com/2007/06/increasing-rubys-netbufferedio-buffer.html -module Net - class BufferedIO - def rbuf_fill - timeout(@read_timeout) { @rbuf << @io.sysread(32768) } - end - end -end - -connexion = Net::HTTP::new('www.allocine.fr').start -connexion.finish -html = connexion.get("/film/fichefilm_gen_cfilm=120576.html").body -p html \ No newline at end of file +p "image".match(Regexp::new("image", true)) \ No newline at end of file