Clubjudge/syringe — pull request #2 by inf0rmer (2014-04-09 14:11:49+00:00)
Title: Uses the last parameter as context for the injected function

Fix #1

@agravem, I had to take this route because all arguments after ```fn``` are injectables, and passing ```context``` as a hard argument before those would break the existing Syringe API. Do you see any problems with always using the last object as context? Here are the possible cases:

1. You only pass ```fn```, in which case nothing is injected and the function is executed with itself as context (This is the current behaviour, FYI);

2. You pass a number of injectable objects without providing a specific context, so Syringe will use the last injectable object as context. This might be bad, however, chances are you're not caring about context anyway (or you'd be providing it), in which case setting it to a simple hash has no apparent side effects (or does it? I can't think of anything...)

3. You pass a specific context and all goes according to plan.