PageRenderTime 38ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/spec/tags/core/io/foreach_tags.txt

https://github.com/ryog/topaz
Plain Text | 45 lines | 45 code | 0 blank | 0 comment | 0 complexity | 014b02ee16729a1b3f283677f38f7fb4 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. fails:IO.foreach raises TypeError if the first parameter is nil
  2. fails:IO.foreach raises Errno::ENOENT if the file does not exist
  3. fails:IO.foreach converts first parameter to string and uses as file name
  4. fails:IO.foreach returns an Enumerator when called without a block
  5. fails:IO.foreach accepts an optional options argument
  6. fails:IO.foreach with no separator argument yields a sequence of Strings that were separated by $/
  7. fails:IO.foreach with no separator argument updates $. with each yield
  8. fails:IO.foreach with nil as the separator argument yields a single string with entire content
  9. fails:IO.foreach with nil as the separator argument updates $. with each yield
  10. fails:IO.foreach with an empty String as the separator argument yields a sequence of paragraphs when the separator is an empty string
  11. fails:IO.foreach with an empty String as the separator argument updates $. with each yield
  12. fails:IO.foreach with an arbitrary String as the separator argument yields a sequence of Strings that were separated by r
  13. fails:IO.foreach with an arbitrary String as the separator argument updates $. with each yield
  14. fails:IO.foreach with an arbitrary String as the separator argument accepts non-ASCII data as separator
  15. fails:IO.foreach with an object as the separator argument calls #to_str once for each line read to convert it to a String
  16. fails:IO.foreach with an object as the separator argument calls #to_path on non-String arguments
  17. fails:IO.foreach when the filename starts with | gets data from the standard out of the subprocess
  18. fails:IO.foreach when the filename starts with | gets data from a fork when passed -
  19. fails:IO.foreach updates $. with each yield
  20. fails:IO.foreach sets $_ to nil
  21. fails:IO.foreach raises an Errno::ENOENT if the file does not exist
  22. fails:IO.foreach yields a single string with entire content when the separator is nil
  23. fails:IO.foreach yields a sequence of paragraphs when the separator is an empty string
  24. fails:IO.foreach when passed name calls #to_path to convert the name
  25. fails:IO.foreach when passed name defaults to $/ as the separator
  26. fails:IO.foreach when passed name, object calls #to_str to convert the object to a separator
  27. fails:IO.foreach when passed name, object when the object is a Fixnum defaults to $/ as the separator
  28. fails:IO.foreach when passed name, object when the object is a Fixnum uses the object as a limit if it is a Fixnum
  29. fails:IO.foreach when passed name, object when the object is a String uses the value as the separator
  30. fails:IO.foreach when passed name, object when the object is a String accepts non-ASCII data as separator
  31. fails:IO.foreach when passed name, object, object when the first object is a Fixnum uses the second object as an options Hash
  32. fails:IO.foreach when passed name, object, object when the first object is a Fixnum calls #to_hash to convert the second object to a Hash
  33. fails:IO.foreach when passed name, object, object when the first object is a String uses the second object as a limit if it is a Fixnum
  34. fails:IO.foreach when passed name, object, object when the first object is a String calls #to_int to convert the second object
  35. fails:IO.foreach when passed name, object, object when the first object is a String uses the second object as an options Hash
  36. fails:IO.foreach when passed name, object, object when the first object is a String calls #to_hash to convert the second object to a Hash
  37. fails:IO.foreach when passed name, object, object when the first object is not a String or Fixnum calls #to_str to convert the object to a String
  38. fails:IO.foreach when passed name, object, object when the first object is not a String or Fixnum uses the second object as a limit if it is a Fixnum
  39. fails:IO.foreach when passed name, object, object when the first object is not a String or Fixnum calls #to_int to convert the second object
  40. fails:IO.foreach when passed name, object, object when the first object is not a String or Fixnum uses the second object as an options Hash
  41. fails:IO.foreach when passed name, object, object when the first object is not a String or Fixnum calls #to_hash to convert the second object to a Hash
  42. fails:IO.foreach when passed name, separator, limit, options calls #to_path to convert the name object
  43. fails:IO.foreach when passed name, separator, limit, options calls #to_str to convert the separator object
  44. fails:IO.foreach when passed name, separator, limit, options calls #to_int to convert the limit argument
  45. fails:IO.foreach when passed name, separator, limit, options calls #to_hash to convert the options object