Let's say that a scientist has found a way to create and control portals. (for this instance, the portals are the ones from the game PORTAL) If the need arise, could said scientist put an object is said portal then close it, and what would happen to said object?
I believe the instant you put something into one side of the portal, out comes out the other, as if you stepped through a doorway. Do you mean what happens if you turn off the portal while the object is halfway through when the portal closes?
If you want to destroy something -- as in the game -- it's easier to open up one side of the portal high above the target and one side on the floor beneath the target and let the target fall repeatedly through until it reached terminal velocity, then close the portal, so the object crashes at high speed into the floor. Or open a portal high above the target and then open the other side under a very heavy object so that it crashes onto the target.
In general, the use of teleporters as weapons is known as telefragging, and is so commonly brought up in science-fiction works involving teleportation that it has its own TV Tropes page. The specific version here also has a TV Tropes page: "Portal Cutting".
The theory behind portal-cutting is, if a portal is closed while something is halfway through it, that thing will be sliced cleanly in two, with one half remaining on one side of the portal and the other half remaining on the other side. Naturally, if the object in question is a person, the results will not be pretty. You know those sliding elevator doors? Imagine getting sliced in half by them. Yeah. Not pretty.
So yes, your scientist could most certainly weaponize this. And not just by cutting his enemies in half, either. He could set up one portal above a shark tank, or on the side of a 100-story building, or over a vat of molten iron, or in the middle of frozen Siberia, or whatever, then fire a second portal beneath his enemy's feet and send them plunging into it.
For maximum fun, you could even just fire portals above and below them and trap them in an infinite loop of falling (let's face it, everyone who's played Portal has done this at some point). Within a matter of seconds they'll be falling fast enough that if you move one of the portals, they'll slam into the nearest surface at lethal speeds. Alternatively, trap something else in an infinite loop, and you won't be able to get past it without getting hit by an object travelling at terminal velocity.
Note that portal-cutting is not, in fact, possible in Portal, where closing a portal with an object halfway inside it will just push the object away. Presumably, this was so Valve didn't have to mess around with dynamically slicing game objects in half; an in-universe explanation would be that Aperture's portal technology uses wormholes, which would close like that anyway, as @Joe Bloggs describes in the comments. HOWEVER...
Even if your portal system does work like Portal's, you can still weaponize it. There's the infinite-loop trick, or, depending on the speed that objects get pushed out at, you could potentially have "portal cannons" that eject stuff at high speed. Or just go down the Looney Tunes route and eject really heavy things from high up. A giant anvil or grand piano dropped from the top of a wall ought to hurt plenty (and would probably be as funny as the infinite-falling trick).
Given the mechanics from the game Portal:
One portal would not do anything, connecting it to another would simply connect space at either portal. This has various potential uses as a weapon, mainly from connecting a hazardous environment to the space near the object.
Some potential uses:
- Create a portal below an object, the object would fall in. When the object is halfway in, close the portals. The object would be cut in two.
- Create a portal below an object, the object would fall in. Have the other portal somewhere high up, the object would then drop from a great height.
- Create a portal next to an object, with the other portal in or close to to a blast furnace. The object would then be blasted with heat.
- Create a portal next to an object and the other in a container with hazardous liquid, acid, scalding water, water under very high pressure, etc.
- Create a portal next to an object and the other in a (large) vacuum, the object could be sucked into the vacuum.
Edit: now with more obscure science:
As you stated, the person with this portal gun is a scientist, so he or she will probably have access to, and can figure out how to use some cool lab stuff to their advantage.
Accelerating a charged object to arbitrary speeds:
Similar to how a cathode ray tube works: First you create two portals on two (perfectly) parallel plates, on the surfaces facing eachother.
Then you have a ring of conductive material around one of the portals (slightly behind it), and a very light object, with a vacuum inbetween the portals. Apply identical charges to the ring and the object, and apply and adjust a magnetic field to keep the object centered while it gets repulsed again each time it passes through the portals, you now have a particle (for macroscopic particles) accelerator which should be able to (given a strong magnetic field to deflect the object) launch the object at something at relativistic speeds. (caveat: I don't know how electric fields would behave around the portal borders)
The same goes for gravitational acceleration, though it's much harder to deflect a non-charged object, but so long as you charge the object you can just accelerate it using gravity and then deflect it with a magnetic field.
Create arbitrarily strong magnetic fields (and use it to disintegrate stuff)
If you've got a coil around the space in between two portals, the magnetic field lines would run from one portal to the other. If you move the portals closer together, there's in effect 'more coil' per unit length of magnetic field line, which would increase the strength of the magnetic field to ridiculous amounts. Ridiculously strong magnetic fields can break stuff.
You'll probably need near infinite energy, so you'll also need a portal in your hydro-electric dam.
Travel through time and kill their grandparents
You'll need some serious space-ship power for this, but hey, you've got a free ride to the moon already so launching it is much easier.
Also, given your ability to launch stuff at arbitrarily high speeds, propulsion shouldn't be much of a problem.
Once you achieve relativistic speeds, space-time starts behaving weirdly, and teleportation can become time travel. But it's complicated, further reading: https://en.wikipedia.org/wiki/Light_cone
Yes. Portals in the game portal also appear to violate conservation of energy so can be used for that as well.
Fire one portal at the moon or at an object in orbit and open another in a chamber at sealevel, put anything you like in orbit, for example a huge number of Rods From God ready to deploy.
Cannon on demand
Take one incredibly powerful piece of artilery and one end of a portal in front of the gun.
Then whenever you want to destroy something open the other end of the portal facing your target and let your gun fire.
Create a portal at the bottom of a pool of lava.
To deploy simply open a second portal above or near your target and spew lava at them.
Generate unlimited free energy.
Build a tall circular vacuum chamber surrounded by loops of conductive wire. Take a huge circular, extremely heavy magnetic weight and open portals at the top and bottom. The power you can generate is limited only by the size of the weight.
Not a weapon itself but super useful for almost all purposes.
Fire one portal at the moon, open a second anywhere near your target, watch as they get sucked into orbit.