lib/hash-utils/stringio.rb in hash-utils-2.0.1 vs lib/hash-utils/stringio.rb in hash-utils-2.0.2

- old
+ new

@@ -5,21 +5,40 @@ ## # StringIO extension. # -class StringIO < Data +if Ruby::Engine != :rbx + class StringIO < Data - ## - # Indicates, object is IO, so +IO+ or +StringIO+ class. - # - # @return [Boolean] +true+ if yes, +false+ in otherwise - # @since 0.14.0 - # - - if not self.__hash_utils_instance_respond_to? :io? - def io? - true + ## + # Indicates, object is IO, so +IO+ or +StringIO+ class. + # + # @return [Boolean] +true+ if yes, +false+ in otherwise + # @since 0.14.0 + # + + if not self.__hash_utils_instance_respond_to? :io? + def io? + true + end end + end - +else + class StringIO < Object + + ## + # Indicates, object is IO, so +IO+ or +StringIO+ class. + # + # @return [Boolean] +true+ if yes, +false+ in otherwise + # @since 0.14.0 + # + + if not self.__hash_utils_instance_respond_to? :io? + def io? + true + end + end + + end end