...Until either the output of list disks changes, or the function
is eliminated
from Standard additions all together, then scripters should be able
to get a
list of disks, and barring reason why they cannot be ejected, eject
them.
The "Finder" way to get a list of disks is "every disk" or "disks".
You can get the same easy-to-read output that "list disks" would give
you, by writing "name of every disk" (or "name of disks"...short, but
not quite grammatical).
As I said earlier, I can't break eject "diskname" now that it
works, I only wish I could. "List disks" is doing what it means to
do, and it can't use Finder's terminology.
If a scripter really wants to get a disk name from "list disks" and
then use it with Finder, I merely suggest being explicit about it:
set foo to item 3 of (list disks)
tell application "Finder"
eject disk foo -- rather than eject foo
end tell