You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm suppose this is a (minor) bug: (ubuntu operating system)
Welcome to the Ammonite Repl 1.8.2
/home/app@ Path("/").ext
java.lang.NullPointerException
os.Path.last(Path.scala:434)
os.BasePathImpl.ext(Path.scala:185)
os.BasePathImpl.ext$(Path.scala:184)
os.Path.ext(Path.scala:423)
ammonite.$sess.cmd1$.<clinit>(cmd1.sc:1)
Best Alex
The text was updated successfully, but these errors were encountered:
Fixescom-lihaoyi/Ammonite#1017
This is more consistent with calling `.ext` on non-empty paths which have no extension, since those currently return `""`
We also introduce a new a `lastOption` method, as a way to get the last segment in a list without throwing. Not sure if that's the right thing to do, or whether we should make `.last` return `""` (which is otherwise not a valid return value, since path segments cannot be empty).
Covered with simple unit tests
I'm suppose this is a (minor) bug: (ubuntu operating system)
Best Alex
The text was updated successfully, but these errors were encountered: