Skip to content
Commits on Mar 20, 2011
  1. @yokolet
Commits on Mar 19, 2011
  1. @yokolet

    Removes bunch of unused methods

    yokolet committed Mar 19, 2011
  2. @yokolet

    More fix for printing. This might be better, but might not be :( I'll…

    yokolet committed Mar 19, 2011
    … push this change but need more effective fix.
  3. @yokolet
  4. @yokolet

    More fix to read dtd

    yokolet committed Mar 19, 2011
  5. @yokolet
  6. @yokolet
Commits on Mar 16, 2011
  1. @flavorjones
Commits on Mar 10, 2011
  1. @yokolet
Commits on Mar 9, 2011
  1. @yokolet
  2. @flavorjones

    default output of XML on JRuby is no longer formatted due to inconsis…

    flavorjones committed Mar 9, 2011
    …tent whitespace handling. Closes #415
  3. @flavorjones
Commits on Mar 8, 2011
  1. @yokolet
Commits on Mar 4, 2011
  1. @flavorjones
Commits on Feb 27, 2011
  1. @ender672 @flavorjones

    Prevent buffer overflow in xml_io.c when io return string is too long

    ender672 committed with flavorjones Feb 7, 2011
    If an IO object returns a string that is longer than expected, io_read_callback() writes past the limit of the buffer and crashes the interpreter. This patch checks against the size of our buffer before copying the data over.
    I can't really think of a case where an IO object would do something this silly, but seems like a good practice anyways.
Commits on Feb 24, 2011
  1. @hcatlin @flavorjones

    Allow for"..") to be executed as XPath

    hcatlin committed with flavorjones Feb 24, 2011
    instead of being converted to CSS. This seems like a reasonable
    bit of XPath and our users have tried it many, many times.
    Might want to consider search(".") as XPath instead of CSS
    also. However, this was left out.
Commits on Feb 16, 2011
  1. @flavorjones
Commits on Feb 15, 2011
  1. @FooBarWidget

    Free vasprintf() results with Ruby Enterprise Edition's system_free()…

    FooBarWidget committed Feb 15, 2011
    … API if possible, and fix some potential memory leaks while we're at it.
    REE uses tcmalloc by default, but on OS X libc's vasprintf() allocates
    memory with the system's malloc() function instead of tcmalloc's. If we
    were to free its result with tcmalloc's free(), it will cause a crash.
    This commit makes use of REE system_free() function to free vasprintf()
    results. More info:
    Some functions also leak string memory if an exception is raised. This
    patch makes sure those strings are freed no matter what.
Commits on Feb 4, 2011
  1. @ender672 @tenderlove

    Fix Memory Leak in xml_io.c

    ender672 committed with tenderlove Feb 5, 2011
    This example will use up all system memory:
      require 'nokogiri'
      class BadIO
        def read(*args)
          raise 'hell'
      100000000.times do
        Nokogiri::XML.parse( rescue nil
    The example above is obscure, but imagine an HTTP object raising TimeoutError. Nokogiri leaks memory every time this happens.
    I became suspicious of this when looking at ext/nokogiri/xml_io.c. io_read_callback() is invoked in the middle of some libxml operation, which may not behave well when a ruby exception is thrown and it gets interrupted. It seems that the safe way to handle this is to wrap the method call in rb_rescue.
    Note that the same applies to io_write_callback() in xml_io.c. Although I did not notice a memory leak with io_write_callback(), wrapping with rb_rescue() seems like the correct thing to do in both cases.
    A side effect of this fix is that IO errors will be silently discarded.
Commits on Feb 2, 2011
  1. @tenderlove

    opting in to .gemtest

    tenderlove committed Feb 2, 2011
  2. @tenderlove

    updating readme, fixes #411

    tenderlove committed Feb 2, 2011
Commits on Feb 1, 2011
  1. @yokolet

    Tweaks dparnell's patch so that Java's error message won't show up wh…

    yokolet committed Jan 31, 2011
    …ile test is running.
  2. @dparnell @yokolet
  3. @dparnell @yokolet
Commits on Jan 31, 2011
  1. @drbrain

    Fix typo

    drbrain committed Jan 31, 2011
  2. @drbrain

    Shorten long lines

    drbrain committed Jan 31, 2011
  3. @drbrain

    Work around rake not understanding platforms, allows Nokogiri to buil…

    drbrain committed Jan 31, 2011
    …d on jruby with rubygems 1.4+
Commits on Jan 28, 2011
  1. @tenderlove

    nodoc jruby?

    tenderlove committed Jan 28, 2011
  2. @tenderlove
  3. @tenderlove
  4. @tenderlove

    specify the lib_dir

    tenderlove committed Jan 28, 2011
  5. @tenderlove

    no needto check for java

    tenderlove committed Jan 27, 2011
  6. @tenderlove

    switch to RbConfig

    tenderlove committed Jan 27, 2011
  7. @tenderlove

    removing unused codes

    tenderlove committed Jan 27, 2011
  8. @tenderlove
Something went wrong with that request. Please try again.